[pypy-dev] Speeding up zlib in standard library

Peter Cock p.j.a.cock at googlemail.com
Wed Mar 21 18:10:35 CET 2012


On Tue, Mar 20, 2012 at 2:52 PM, Maciej Fijalkowski <fijall at gmail.com> wrote:
>
> Hey
>
> You're confusing levels. Your benchmark code cannot call zlib.

PyPy development has quite a learning curve.

> I suggested you benchmark not zlib, but your changes to StringBuilder
> that you proposed. That does not (and cannot) require zlib. You'll be
> testing something smaller that you're trying to change instead. Then
> obviously a comparison with CPython is meaningless.

i.e. I would create the new StringBuilder benchmark as the file
pypy/translator/targetStringBuilder.py and do this:

$ cd pypy/translator/goal/
$ python translate.py targetStringBuilder.py
$ ./targetStringBuilder-c

Then modify the pypy/rpython/lltypesystem/rbuilder.py (or whatever)
and repeat this. And that should compare the benchmark translation
by the virgin PyPy against the translation by my modified PyPy?

That doesn't sound quite so intimidating... and if I've understood this
now it does seem like the basis of a good development FAQ entry:
http://doc.pypy.org/en/latest/faq.html#development

Then if the benchmark results are encouraging, in principle I could
then recompile the whole of pypy (which is slow), and then go back
to run the patched pypy on my real script to see what difference it
makes, if any.

Right?

Thanks for bearing with me,

Peter


More information about the pypy-dev mailing list