[Numpy-discussion] Psymeric-update

Tim Hochberg tim.hochberg at ieee.org
Mon Feb 17 13:06:03 CST 2003

The good news is Psymeric now supports complex numbers and inplace 
addition and complex numbers (Complex32 and Complex64). Also by doing 
some tuning, I got the overhead of Psymeric down to less than three 
times that of Numeric (versus 20 times in the version of Numarray that I 
have). Even without Psyco, the code only has overhead of five and half 
times that of Numeric, so it seems that the Numarray folks should at 
least be able to get down to that level without throwing everything into C.

I have not been able to increase the asymptoptic speed and I think I'm 
probably stuck on that front for the time being. For the most part 
Psymeric is close to Numeric for large arrays, which makes it about 50% 
faster than numarray for noncontiguous and half as fast for contiguous 
arrays. These timings are for Float64: for Int8, Psymeric is ~3x slower 
than Numeric and for Int16 it's 50% slower, for Int32 2x slower. 
Psymeric is very slow for Float32 and Complex32 (~10x slower than 
Numeric) beacause of some Psyco issues with array.arrays and floats 
which I expect will be fixed at some point. And finally, for Complex64, 
psymeric is comparable to Numeric for addition and subtraction, but 
almost half as fast for multiplication and almost a third as fast for 

Barring some further improvements in Psyco or some new insights on my 
part, this is probably as far as I'll go with this. At this point, it 
would probably not be hard to make this into a work alike for Numeric or 
Numarray (excluding the various extension modules: FFT and the like). 
The one relatively hard part still outstanding it 
ufunc.accumulate/reduce. However, the performance while very  impressive 
for an essentially pure python solution is not good enough to motivate 
me to use this in preference to Numeric.

If anyone is interested in looking at the code, I'd be happy to send it 
to them.



More information about the Numpy-discussion mailing list