[pypy-dev] PyPy and RinohType

Brecht Machiels brecht at mos6581.org
Mon Feb 3 23:53:05 CET 2014


I spoke to Romain and Armin at FOSDEM about the poor performance of PyPy running my application, RinohType.

I'm not sure I mentioned that RinohType only runs on Python 3. Perhaps this can partly explain the poor performance? Anyhow, here's how you can benchmark RinohType:

    git clone --branch pypy https://github.com/brechtm/rinohtype.git
    cd rinohtype/examples/rfic2009

Now compare

    rm -rf template.ptc ; PYTHONPATH=../.. python3 template.py


    rm -rf template.ptc ; PYTHONPATH=../.. pypy3 template.py

template.ptc caches some of the rendering state, so be sure to remove it before running template.py.
The output (template.pdf) is messed up but don't worry about that.

For me, pypy3 (50 seconds) takes about 5 times longer than python3 (10 seconds). I also tried this on Windows (32 bit) some time ago with similar results.

I am running Arch Linux with Python 3.3.3 and PyPy3 2.1.0 beta1 (from Arch packages).
Python 3.2.3 (d63636b30cc089cd7f3b658766bd6f5cdaa381dd, Aug 08 2013, 17:13:31)
[PyPy 2.1.0-beta1 with GCC 4.8.1 20130725 (prerelease)]

It would be great if you could have a look at what's going on inside the JIT to see what's causing the slowdown.

In any case, thanks for all your efforts!

More information about the pypy-dev mailing list