Hi all,

I am looking at some benchmark numbers from some of my code,
and one area where PyPy is slower than 'C' Python (perhaps twice
as slow) is code making heavy use of the zlib standard library.

I had a look at this page about how C libraries are called from PyPy,
it seems sketchy and perhaps somewhat out of date too. I'd find it
helpful if it commented on what PyPy was using for the standard
library C modules: http://doc.pypy.org/en/latest/extending.html

Looking at the source of the zlib library in pypy,
https://bitbucket.org/pypy/pypy/src/default/pypy/module/zlib/__init__.py

I see it starts with these imports:

from pypy.interpreter.mixedmodule import MixedModule
from pypy.rlib import rzlib

Which in turn calls the restricted code,
https://bitbucket.org/pypy/pypy/src/default/pypy/rlib/rzlib.py

Given http://doc.pypy.org/en/latest/extending.html describes this
mixed module approach as the "most advanced and powerful way"
of calling C code, does that mean in this particular case there are
no low handing fruit to speed up using zlib in PyPy?

Thanks,

Peter
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to