[pypy-dev] RinohType and PyPy2
brecht__gmane at mos6581.org
Wed Aug 5 16:51:19 CEST 2015
Mmm, too bad. Thankfully, with PyPy 2.6.0, speed is about the same as for
CPython. PyPy 2.2.1 was significantly slower.
In any case, thanks for trying out the strbuf optimization. I'm sure it
will be helpful for other applications. And we can rule this out as the
cause of the low performance with RinohType.
I've made some changes to make RinohType more suitable for benchmarking.
You can find it here:
branch pypy_benchmark of git at github.com:brechtm/rinohtype.git
Simply run benchmark_pypy.sh (and benchmark_python.sh).
You can change the length of the document by changing the 'repeat'
parameter in examples/rfic2009/template.xml
For repeat=500, PyPy 2.6.0 is about as fast as CPython 2.7.9
For repeat=5000, PyPy = 214s and CPython = 227s
If you think this benchmark is useful, please include it in
Let me know if there's anything else I can do.
On Wed, 05 Aug 2015 09:52:23 +0200, Maciej Fijalkowski <fijall at gmail.com>
> Hi Brecht
> We tried the strbuf with rinohtype and (after warmup) it's the speed
> of cpython, which is bad.
> investigating some more....
> On Sun, Mar 2, 2014 at 12:34 AM, Brecht Machiels <brecht at mos6581.org>
>> I've managed to backport RinohType to Python 2 (took me only a couple
>> of hours thankfully).
>> Results on my Celeron T3000 (Arch Linux x86_64):
>> CPython 3.3.4 14 s
>> PyPy3 2.1.0-beta1 61 s
>> CPython 2.7.6 15 s
>> PyPy 2.2.1 35 s
>> If you want to give it a try (no external dependencies):
>> git clone --branch pypy2 https://github.com/brechtm/rinohtype.git
>> cd rinohtype/examples/rfic2009
>> rm -rf template.ptc; PYTHONPATH=../.. pypy template.py
>> While PyPy2 performs better than PyPy3, it's still much slower than
>> CPython. Is RinohType hitting a weak spot in PyPy? Any hints on what I
>> can do to improve performance?
>> Best regards,
More information about the pypy-dev