Julia's Python performance example in pypy
Question: [Julia](http://julialang.org/) is a new statistical programming language that
claims significantly better performance than competing languages. I'm trying
to verify this. Julia has a performance test written in Python:
<https://github.com/JuliaLang/julia/blob/master/test/perf/perf.py>

I can't get it to work with pypy. Perhaps this is due to numpypy
incompatibilities with numpy, but I'm not getting far enough to determine
that. I followed the ImportError advice `"...or just write 'import numpypy'
first in your program..."` but I get another ImportError: `"No module named
numpy.linalg"`

I have near zero experience with Python and I'm looking for a complete
solution that I can run. The benefit of getting this to work is that we can we
have a apples-to-apples (jit lang-to-jit lang) comparison.


Answer: ![Test of python and julia performance](http://i.stack.imgur.com/Fz8H4.png)

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 ]

![Recursion in Pypy Python and Julia](http://i.stack.imgur.com/zFsSY.png)

* * *

**Because are implemented with recursion, Quicksort and fib are slower in
Pypy.**

**Pypy looks to have the same performance than Julia.**

