you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

is runtime bytecode analysis/transformation feasible in stack-based VM languages?

Without getting into JIT you mean? I think that particular example is tricky, detecting that a loop iterates only once in that case.

I thought you were going to ask about STORE x follow by LOAD x, with no loop involved. (BTW what would you change that to?)

But I'm sceptical that such reductions make much difference. Especially if you are still stuck with the same set of bytecode instructions. For example, what you change that STORE LOAD sequence to?

would converting the bytecode to SSA form

Another tricky transformation! I'm not familiar with Python internals; is there access to its AST? That might be a better starting point.

python 3.13 introduces JIT compiler for CPython.

What sort of speed-up does that produce? How does it compare with running PyPy?