Two paths, one peak: a view on high-performance language implementations
wingolog.org
wingolog.org
There seems to be a desire for this magic inliner and compiler that fixes all your performance problems when it just doesn't work like that.
Until you understand your data and have complete control over it none of this other stuff matters.
That doesn't matter much if each function call accesses thousands of memory locations, but if you have many small functions such as calls to (un)box objects or property accessors, or small closures you pass to a function, getting rid of the function calls by inlining code makes a huge difference.
Sadly, it buys you sorely little. CPython's bytecodes are "big", so very little time is spent between them relative to that spent inside them. The motivation to do anything smarter here is lacking.