Decode the opcode header once per instruction via RuntimeOp.seek - #21602
NullVoxPopuli wants to merge 1 commit into
Conversation
Split out of nvp/simplify-some-vm-hot-paths. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Benchmark: Ran via
|
|
@NullVoxPopuli FWIW: Claude found flaws (but for |
|
@johanrd can we trust that those very private tests are valid? afaik, the test setup could be wrong? |
|
@NullVoxPopuli true, though, the tests were created to prove this failure:
|
|
right, but would an app ever do run in to that? |
|
no, it wont affect real apps, it only affects Maybe just delete the line, not port it? (the op seems to be discarded immediately after, nothing reads it? – not very familiar with opcodes, sorry.) |
|
@NullVoxPopuli else, very cool that you have found these improvements to the vm (also the other prs!). Thanks! |
RuntimeOpImplnow decodestype,size, andisMachinein a singleseek(offset)call instead of re-reading the heap in three getters.The
RuntimeOpinterface fields become readonly andseekis the only way to move the cursor.