I have a Python project where performance is fairly important. Honestly, I know Python (at least pure Python) isn't the best tool for the job, but I'm using it anyhow because I want to distribute a very simple pure python version of some research code so that people can modify it, etc. without having to set up a complicated environment. (I also have an alternative implementation, written in D, which is much faster but harder to hack.)
I was using PyPy as my interpreter and recommending it to anyone who usd this code. This was giving me reasonable speed. I then decided to tweak the algorithm and needed to access to some functions from SciPy (all I need is the CDF, survival function and inverse CDF for the Chi-square distribution). I tried running my code in CPython to get access to SciPy and it's slow as molasses.
Can someone suggest one of three things:
A kludge that will allow me to use some bits and pieces of SciPy from PyPy.
Even better, pure python implementations of the chi-square distribution functions I need, under a liberal license?
A way to JIT the bottlenecks from CPython? I'm aware of Psyco, but it appears unmaintained and only works on 32-bit systems.