Julia's Python performance example in pypy
There are 4 test on Julia git (perf.py) in pure Python.Here, I run, in the same computer, perf.py (only the pure Python test) and perf.pl for a apples-to-apples comparison.I'm a little worried for Python/Pypy timing :/
And... Why
## fibonacci ##def fib(n): if n<2: return n return fib(n-1)+fib(n-2)
is slower in Pypy than in Python ?
I post this question in https://bugs.pypy.org/issue1344 [Pypy slower in recursion than Python2.7, Python3.2 and Julia]I get the next answer:
This is a situation where the warmup time is very significant (it tries to inline all the recursion), but once you warm it up it's actually very fast.
So, I do the text with different numbers of n for fib(n). Indeed, Pypy comes faster than Python with a n > 30, but in recursion is slower than Julia:
[ En bold the faster python implementation ]
Because are implemented with recursion, Quicksort and fib are slower in Pypy.Julia seems to be faster than PyPy.
Linalg is not implemented as of now. I think a new ffi and getting 1.9 out of the door (which require quite a few numpy fixes, see the bug tracker) are getting top priority. I don't think having linalg right now is that interesting. We would like to have more of numpy running first. I'm open to be convinced though. Arguments?