a basic bytecode to machine code compiler

Dan Stromberg drsalists at gmail.com
Fri Apr 1 03:35:38 CEST 2011

On Thu, Mar 31, 2011 at 5:52 PM, Terry Reedy <tjreedy at udel.edu> wrote:

> On 3/31/2011 6:33 PM, Rouslan Korneychuk wrote:
>> I was looking at the list of bytecode instructions that Python uses and
>> I noticed how much it looked like assembly. So I figured it can't be to
>> hard to convert this to actual machine code, to get at least a small
>> boost in speed.
>> And so I whipped up a proof of concept, available at
>> https://github.com/Rouslan/nativecompile
>> I'm aware that PyPy already has a working JIT compiler, but I figure it
>> will be a long time before they have a version of Python that is ready
>> for everybody to use, so this could be useful in the mean time.
> I believe PyPy folk think it ready now, at least for some uses. Speedwise,
> it is more or less is now comparable to CPython, winning some benchmarks,
> losing others.
> ...
>  What do people think? Would I be wasting my time going further with this?
> Depends on whether your goal is personal (learning, fun, use) or usefulness
> to others. For the latter, you *might* do better to help with an existing
> project, such as Cython or Dufour's ShedSkin.

Nuitka is also relevant, as is Pyrex (Pyrex being pretty similar to Cython).

Pypy's getting pretty stable now, as long as you don't demand too much of C
extension modules or ctypes.  For pure python code, I'm finding Pypy quite
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110331/8b35775d/attachment.html>

More information about the Python-list mailing list