[SciPy-dev] Speed tests

Travis Oliphant oliphant at ee.byu.edu
Wed Oct 19 23:19:55 CDT 2005

Currently, there is a bit more overhead for ufuncs in scipy core then 
there was in Numeric.

This overhead is not especially significant for large arrays.  However, 
for small arrays, it can mean 2x-3x slowdown.  The code attached shows a 
case where I observe a 2x slowdown.

About half of the overhead is due to looking up an error mask, a 
callback function, and a buffer size in the local, global, and builtin 
scope.  (If I just use defaults and don't try and look them up, the 
slow-down shown by the attached test goes to about 50% slower).  

So, the question is, Is this acceptable, or should a different approach 
to setting the error mask be taken?

I can immediately see that even if we keep the current method, I need to 
fix things so that only one look-up is done (and a tuple returned) 
instead of three  separate lookups. 

Any ideas?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: numerictest.py
Type: text/x-python
Size: 361 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-dev/attachments/20051019/eacb0258/attachment.py 

More information about the Scipy-dev mailing list