2012/7/18 Victor Stinner <victor.stin...@gmail.com>

> I don't expect to run a program 10x faster, but I would be happy if I
> can run arbitrary Python code 25% faster.
>

If that's your target, you don't need to resort to a
bytecode-to-binary-equivalent compiler. WPython already gave similar
results with Python 2.6.

The idea behind is that using an hybrid stack-register VM, you'll spend
less time on the ceval loop "constant stuff" (checking for events / GIL
release, etc.). That's because superinstructions aggregates more bytecodes
into a single "wordcode", which requires only one decoding phase, avoids
many pushes/pops, and some unnecessary inc/decr reference counting. A
better peephole optimizer is provided, and some other optimizations as well.

There's also room for more optimizations. I have many ideas to improve both
WPython or just the ceval loop. For example, at the last EuroPython sprint
I was working to a ceval optimization that gave about 10% speed improvement
for the CPython 3.3 beta trunk (on my old MacBook Air, running 32-bit
Windows 8 preview), but still needs to be checked for correctness (I'm
spending much more time running and checking the standard tests than for
its implementation ;-)

In the end, I think that a lot can be done to improve the good old CPython
VM, without resorting to a JIT compiler. Lack of time is the enemy...

Regards,
Cesare


> --
>
> Specialization / tracing JIT can be seen as another project, or at
> least added later.
>
> Victor
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/cesare.di.mauro%40gmail.com
>
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to