NumPy in PyPy - status and roadmap
morepypy.blogspot.com
morepypy.blogspot.com
The only alternative would be to make PyPy compatible enough with CPython to be able to load Numpy, but that would prevent you from taking advantage of many of PyPy's best features.
The only tiny set of functionality referenced in the article is the portion of Numpy which has already been rewritten as a proof of concept. Much, much more still has to be done before there is a generally useful version of Numpy for PyPy.
they are not doing that. they are using rpython instead. rpython is lower level. it is what is used to write the core of pypy.
which raises the question - when should people use rpython rather than python? and that is answered, at the link, by someone saying that people should almost always use python, not rpython. the need for rpython here is based on low level considerations like access to sse instructions.
[edit: where i wrote "couldn't they just implement that part?" i meant "couldn't they just implement that part in rpython and the rest in python?". hopefully that and the above clarifies things.]
and sorry if thinking for myself rather than blindly trusting others offends you.
my point, again, is that pypy is supposed to give speed comparable to c (particularly in tight loops that don't have changes of type, which you would imagine numpy to be) without needing to write in either c or rpython - you can just use python.
and this is confirmed by the poster on that thread, who said that numpy was exceptional, and that other people should not need to use rpython... my original comment, then, was that perhaps whatever was unusual could itself be abstracted out and made available at the python level.
it's really not that hard to understand, is it? :o(
JITs can help with tight loops that can't be identified and optimized at compile time, but that's not what Numpy is composed of, and code using numpy shouldn't have to go through several iterations before the Numpy routines get identified as hotspots and optimized. Numpy implements algorithms that are designed to be easy to statically compile into machine language code that makes efficient use of memory, FPU, and cache resources.
it's often the case in numerical code that there's some algorithm that you can't convert into standard matrix routines, but you still want it to run fast. when you're using BLAS + fortran (or c) that's not a problem. but here it will be.
sure, that was also an issue with numpy - but why can't pypy be better than old numpy?
[i am not trying to ask for the technically impossible here - i'm saying that numpy is not so amazingly different that rpython isn't going to be necessary for other projects. either make rpython accessible, or do numpy in some other way - what bugs me is the "we can use rpython because we're special, but you can't because you don't need the power" attitude]