I have never tried psyco before (I surprise that 2 lines of code can save a lot of seconds.). When I have to work with a lot of number manipulations, I use only numpy. This also save a computing time too.
Yep, if you are doing numerically intensive calculation in Python, you should use numpy and/or psyco.
The key to make Python fast enough is to delegate as much work as possible to library functions since they are highly optimized. Of course, this assumes that we already choose an appropriate algorithm for our work.
On the other hand, a lazy+quick way is to enable psyco and see if anything improve! :-D
2 comments:
Thank you Aj. Ko. :)
I have never tried psyco before (I surprise that 2 lines of code can save a lot of seconds.).
When I have to work with a lot of number manipulations, I use only numpy. This also save a computing time too.
Yep, if you are doing numerically intensive calculation in Python, you should use numpy and/or psyco.
The key to make Python fast enough is to delegate as much work as possible to library functions since they are highly optimized. Of course, this assumes that we already choose an appropriate algorithm for our work.
On the other hand, a lazy+quick way is to enable psyco and see if anything improve!
:-D
Post a Comment