Hi mailing,

 

I've been writing a complex program in python, which I am currently scaling
up. I find myself in the position now, where I run out of memory or out of
time. I have been looking at alternatives like cython and ctypes. I
implemented ctypes which fixes the memory problem but doubles the time
problem.

 

Currently I am implementing a cython version and ran into a problem. I hope
someone can help me out.

 

The main bottleneck in my code is a large dictionary / hash table which I
would like to optimize. Since a dictionary is a python datatype I have no
idea how to make this cython.

 

Currently I have tried to keep the 'keys' intact and store the 'values' as
ctypes floats, but I think it might be better to do something else. Do I
need to make the entire hash table c? Or is there a more simple solution
like combining the python dict with cython? If so, how do I do this?

 

Thanks in advance.

 

Additional details: I use a double dict where the key of the first dict
stores another dict as value.

 

S.

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to