[Python-Dev] Python 3 optimizations...

stefan brunthaler sbrunthaler at gmail.com
Thu Jul 22 13:22:48 CEST 2010


Hello,

during the last year, I have developed a couple of quickening-based
optimizations for the Python 3.1 interpreter. As part of my PhD
programme, I have published a first technique that combines quickening
with inline caching at this year's ECOOP, and subsequently extended
this technique to optimize several load instructions as well as
eliminate redundant reference counting operations from instructions,
which has been accepted for publication for an upcoming conference.
I have a working prototype combining all of these optimizations that
achieves a maximum speedup of 2.18 on the spectralnorm benchmark of
the computer language benchmarks game. Early measurements on the
Unladen Swallow django benchmark (with Martin von Loewis' patch for
Python 3) achieve a speedup of about 1.3. Both speedups were measured
on an i7 920 when combined with the threaded code/computed goto
optimization enabled, and normalized by the standard Python 3.1
interpreter with all optimizations disabled.
Since all of these optimizations are purely interpretative, they have
next-to-no additional memory requirements and do not incur extensive
warm-up costs.

I wonder whether you would be interested in integrating these
optimizations with the Python 3 distribution, hence this mail. I could
send copies of the papers, as well as provide my prototype source code
to interested members of the python development community.

Have a nice day,
--stefan


More information about the Python-Dev mailing list