Re:Guido van Rossum's Performance tips for Python
by cma on Saturday October 13, 2012 @05:51PM
(#4649850)
V8 handles them w minimal overhead in JavaScript.
Re:Guido van Rossum's Performance tips for Python
by pjscott on Sunday October 14, 2012 @12:37AM
(#4650656)
And more to the point, PyPy can do Python inlining with its tracing JIT. The method, in both cases, is similar: find some type assumptions that are useful and usually true, generate code under those assumptions, and fall back on more generic code if they're ever false.
A very smart compiler could probably attempt to prove that no such modification can occur at run time throughout the whole program; but this is much harder than simply deciding whether inlining a given call is worth it or not.