a basic bytecode to machine code compiler
Terry Reedy
tjreedy at udel.edu
Thu Mar 31 20:52:33 EDT 2011
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.
--
Terry Jan Reedy
More information about the Python-list
mailing list