3 ms·
Er. Essentially impossible because the inlining only works at situations where you know a whole bunch of things at compile-time. CPython knows essentially nothi
by ris 12y ago
Er. Essentially impossible because the inlining only works at situations where you know a whole bunch of things at compile-time. CPython knows essentially nothing at compile-time.
- fijal 12y agoIt's not impossible. It's "easily" done if you have a JIT, but even without a JIT, you can inline the call on the bytecode level using similar techniques - you have to be able to rebuild the chain if someone asks for it. One can (easily) argue that the complexity is unnecessary and the speedups are unclear. It really depends how hard you try :-) PyPy is generally achieving speedups mostly by: * avoiding allocations by escape analysis * avoiding escape through frames by removing frames * avoiding another level of allocations by inlining calls (and avoiding frames)