[SciPy-User] Speed-up simple function

Nicolau Werneck nwerneck at gmail.com
Mon Jan 10 09:20:18 EST 2011


I would suggest you to write a small piece of code using either scipy
weave or Cython.

I have been using Cython a lot, and it really pays off. But if you
only have a simple expression such as a polynomial to calculate, and
if something simpler such as weave works for you, it might be the best
choice.

++nic


On Mon, Jan 10, 2011 at 02:59:28PM +0100, g.plantageneto at runbox.com wrote:
> 
> Hi everybody,
> 
> I have some functions in python that perform simple computations (they compute the values of some long polynomials). Since I apply them to rather large arrays (10^5 elements) these functions slow down the script quite a bit. Is there a quick and simple way to speed up these functions?
> 
> Thanks,
> Andrea
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

-- 
Nicolau Werneck <nwerneck at gmail.com>          C3CF E29F 5350 5DAA 3705
http://www.lti.pcs.usp.br/~nwerneck           7B9E D6C4 37BB DA64 6F15
Linux user #460716
"I never claimed infallibility. You have to leave that to experts in that field like the Pope."
-- Edsger Dijkstra




More information about the SciPy-User mailing list