2012/7/18 Victor Stinner <span dir="ltr">&lt;<a href="mailto:victor.stinner@gmail.com" target="_blank">victor.stinner@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">I don&#39;t expect to run a program 10x faster, but I would be happy if I<br>
can run arbitrary Python code 25% faster.<br></div></blockquote><div><br></div><div>If that&#39;s your target, you don&#39;t need to resort to a bytecode-to-binary-equivalent compiler. WPython already gave similar results with Python 2.6.</div>
<div><br></div><div>The idea behind is that using an hybrid stack-register VM, you&#39;ll spend less time on the ceval loop &quot;constant stuff&quot; (checking for events / GIL release, etc.). That&#39;s because superinstructions aggregates more bytecodes into a single &quot;wordcode&quot;, 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.</div>
<div><br></div><div>There&#39;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&#39;m spending much more time running and checking the standard tests than for its implementation ;-)</div>
<div><br></div><div>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...</div><div><br></div><div>Regards,</div><div>Cesare</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--<br>
<br>
Specialization / tracing JIT can be seen as another project, or at<br>
least added later.<br>
<span class="HOEnZb"><font color="#888888"><br>
Victor<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/cesare.di.mauro%40gmail.com" target="_blank">http://mail.python.org/mailman/options/python-dev/cesare.di.mauro%40gmail.com</a><br>
</div></div></blockquote><br>