[pypy-dev] Poor performance with custom bytecode

Armin Rigo arigo at tunes.org
Sat Feb 18 12:54:44 CET 2012

Hi Antoni,

On Fri, Feb 17, 2012 at 18:49, Antoni Segura Puimedon
<celebdor at gmail.com> wrote:
> Any suggestion on where to start reading pypy code/material?

In your case, I'd suggest that you should first write a Clojure
interpreter in regular Python, and then worry about making it RPython.
 This is done mostly by following the guidelines in
http://doc.pypy.org/en/latest/coding-guide.html .

Note also that, from what I've understood, it might be useful to
integrate the Clojure interpreter with PyPy to allow calls to the rest
of the Python standard library and built-in modules.  This is
relatively easy to do, and doesn't prevent the JIT from JITting the
clojure interpreter.  (You can have multiple JITs in the same
process.)  I imagine it would be done as a PyPy built-in module, which
can be called from Python code in order to compile and execute Clojure

To do this you would need to follow the general structure shown for
example in pypy/module/_demo/.  This is explained in
http://doc.pypy.org/en/latest/coding-guide.html#mixed-modules .

A bientôt,


More information about the pypy-dev mailing list