Comment

Comment by xscott

For those with Python 2 baselines that aren't (or will never be) ported, PyPy will support version 2 basically forever [0]. PyPy supports a huge number (but not all) of Python packages, including numpy [1]. Moreover, PyPy is significantly faster in many cases [2], and for the numerical types of things I like to write [3], it's amazingly faster.

    > time pypy mandel.py > pypy.pgm
    seconds: 0.318101

    real        0m0.426s
    user        0m0.396s
    sys         0m0.013s

    > time python2 mandel.py > python2.pgm
    seconds: 30.141954

    real        0m30.156s
    user        0m30.136s
    sys         0m0.003s
That's just a silly Mandelbrot example, but for numerical algorithms like this PyPy is nearly 100 times faster than Python2, and that includes startup cost for the JIT!

I'm not in any way associated with the PyPy project, but I can't help but believe a sane world would've moved from Python to PyPy in the same way everything moved from Brandon Eich's original JavaScript interpreter to the modern JIT ones like V8.

[0] https://doc.pypy.org/en/latest/faq.html#how-long-will-pypy-s...

[1] http://packages.pypy.org/

[2] https://speed.pypy.org/

[3] https://godbolt.org/z/J9Xwp6

parent xscott 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton