Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2323

Re: a basic bytecode to machine code compiler

From Terry Reedy <tjreedy@udel.edu>
Subject Re: a basic bytecode to machine code compiler
Date 2011-03-31 20:52 -0400
References <4j7lp.5204$sS4.1784@newsfe11.iad>
Newsgroups comp.lang.python
Message-ID <mailman.58.1301619169.2990.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

a basic bytecode to machine code compiler Rouslan Korneychuk <rouslank@msn.com> - 2011-03-31 18:33 -0400
  Re: a basic bytecode to machine code compiler Stefan Behnel <stefan_ml@behnel.de> - 2011-04-01 02:05 +0200
  Re: a basic bytecode to machine code compiler Terry Reedy <tjreedy@udel.edu> - 2011-03-31 20:52 -0400
  Re: a basic bytecode to machine code compiler Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-01 12:57 +0000
    Re: a basic bytecode to machine code compiler Stefan Behnel <stefan_ml@behnel.de> - 2011-04-01 17:45 +0200
      Re: a basic bytecode to machine code compiler Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-02 10:04 +0000
        Re: a basic bytecode to machine code compiler Stefan Behnel <stefan_ml@behnel.de> - 2011-04-02 12:30 +0200
          Re: a basic bytecode to machine code compiler John Nagle <nagle@animats.com> - 2011-04-02 12:05 -0700
            Re: a basic bytecode to machine code compiler Paul Rubin <no.email@nospam.invalid> - 2011-04-02 14:32 -0700
            Re: a basic bytecode to machine code compiler Robert Kern <robert.kern@gmail.com> - 2011-04-02 19:12 -0500
  Re: a basic bytecode to machine code compiler Rouslan Korneychuk <rouslank@msn.com> - 2011-04-01 15:31 -0400

csiph-web