
Timothy Hochberg wrote:
On 10/29/07, *Christopher Barker* <Chris.Barker@noaa.gov <mailto:Chris.Barker@noaa.gov>> wrote:
>> (incidently, the kind of things 'we' are doing seem like the most > simple things to JIT).
Wouldn't a numpy-aware psyco be cool then?
Oh well, I'm not going to write it!
(though as I think about it, for the special case of a contiguous array, it would be awfully similar to an array.array --- hmmm.)
Psyco is aware of array.array and can operate on array.array's quite fast. [In fact, somewhere I have a ndarray-like class based on Psyco that runs pretty fast for integers, but not so fast for floats]. The problem that Psyco has for numeric purposes is that it has no concept of floating point numbers. It can "natively" store only a few different things: ints, pointers, and arrays of ints or pointers. To put, for example, doubles, onto the Psyco stack or into one of it's registers, you need to break the bits of the double up, and stuff them into a couple of different int registers. Then to operate on them you need to put them back together, since they may get separated. All of this adds a fair amount of overhead.
I've been hoping that the PyPy jit will address this, but I haven't had time to follow that project closely enough to see if that's on the agenda.
My impression is that it is hard to follow pypy when you are not 'part of it', but just from the ML, and a couple of questions of mine, my understanding is that it is on the agenda. They have a JIT (maybe does not work on float, though), there is work on numpy arrays at the rpython level (rpython being the typed subset of python pypy is using at their core). cheers, David
-- . __ . |-\ . . tim.hochberg@ieee.org <mailto:tim.hochberg@ieee.org> ------------------------------------------------------------------------
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion