I have a Python project where performance is pretty important. Honestly, I know that Python (at least pure Python) is not the best tool for this work, but I use it anyway because I want to distribute a very simple clean python version of some research code so that people can modify it, and etc. without the need to create a complex environment. (I also have an alternative implementation written in D that is much faster, but harder to hack.)
I used PyPy as my interpreter and recommended it to everyone who used this code. It gave me a reasonable speed. Then I decided to set up the algorithm and access some functions from SciPy (all I need is a CDF, a survival function, and an inverse CDF for Chi-square distribution). I tried running my code in CPython to access SciPy, and it is slow, like molasses.
Can anyone suggest one of three things:
A treasure that will allow me to use some SciPy pieces from PyPy.
Better yet, pure python implementation of the chi-square distribution functions I need, under a liberal license?
Jit way to bottlenecks from CPython? I know Psyco, but it looks unchanged and only works on 32-bit systems.
source share