Re:Python Patterns - An Optimization Anecdote
by edanm on Tuesday November 02, 2010 @09:37AM
(#1860334)
Interesting. What are the best sources for learning what kind of optimizations are actually implemented in practice in Python?
Re:Python Patterns - An Optimization Anecdote
by riffraff on Tuesday November 02, 2010 @12:24PM
(#1861083)
well neither of the above, in standard python, but the pypy project has _a lot_ of interesting stuff
http://codespeak.net/pypy/dist/pypy/doc/extradoc.html
But you don't need a jit: you can partially execute the code and determine that no changes were happening in the referenced globals, thus the inlining becomes possible.
There is quite a bit of literature on the issue of using partial evaluation for optimizing dynamic/reflective languages.