PyPy now "just works" with @

Gregory Szorc gregory.szorc at gmail.com
Sat Dec 5 00:36:25 UTC 2015


With the latest push to @ earlier today (30a20167ae29), `./hg` will now
"just work" with PyPy.

There is no need to `make local`: you can start with a fresh source
checkout or source distribution and run `./hg` with PyPy (I recommend
version 4.0.1) will run.

If you wish to test with both CPython and PyPy, you can `make local` to
produce the compiled C extensions and they won't interfere with PyPy. This
is courtesy of the new custom importer code that knows how to load either
the C or Python implementations of our dual-implemented modules depending
on the the execution context (or installation options).

Many `hg` commands are faster with PyPy. For example `hg log` on
mozilla-central goes from ~35s with CPython 2.7.10 to ~10.5s with PyPy
4.0.1. Insane. Some manifest heavy operations are slower with PyPy. This is
likely a result of our C implementation being highly optimized and the
Python version being under-optimized.

We could potentially start moving C code to a C shared library and use
ctypes and/or cffi to call into it so PyPy can call the C code (PyPy
doesn't support Python C extensions). Something to think about.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151204/44cec566/attachment.html>


More information about the Mercurial-devel mailing list