3 ms·
I believe a JIT using this technique could eliminate dead code at the Python bytecode level, but not at the machine code level. That seems pretty reasonable to
by SpaghettiCthulu 3y ago
I believe a JIT using this technique could eliminate dead code at the Python bytecode level, but not at the machine code level. That seems pretty reasonable to me.
- kzrdude 3y agoNot sure, these optimizations multiply in power when used together. Propagate constants and fold constants, after that you can remove things like "if 0 > 0", both the conditional check and the whole block below it, and so on.
- SpaghettiCthulu 3y agoThat's entirely possible with the approach I described. Such optimizations can easily be done on the bytecode prior to the compilation to machine code.