My little side project for the past few weeks: a little JS parsing framework, with two different implementations:
1️⃣ A tree-walking interpreter
2️⃣ A switch-style bytecode interpreter
Finally got both to a working state, and the initial benchmark results are a little surprising!
1️⃣ A tree-walking interpreter
2️⃣ A switch-style bytecode interpreter
Finally got both to a working state, and the initial benchmark results are a little surprising!
I expected the bytecode interpreter to be faster, but it's actually significantly slower!
Next: figure out why :-)
Next: figure out why :-)
Any V8 experts have an idea why there is a deopt at the beginning of the interpreter loop?
The exit condition is not complex — it's `do { ... } while (ruleStack.length > 0)`.
(Screenshot here from github.com/microsoft/deop…, which is a super useful tool)
The exit condition is not complex — it's `do { ... } while (ruleStack.length > 0)`.
(Screenshot here from github.com/microsoft/deop…, which is a super useful tool)
I managed to fix a bunch of the deopt causes but the main method in my switch-based interpreter is still suffering from deopts for non-obvious reasons…
Seeing similar performance on JSC (w/ @bunjavascript). What's the best tool to investigate JIT performance in JSC?
Seeing similar performance on JSC (w/ @bunjavascript). What's the best tool to investigate JIT performance in JSC?
https://twitter.com/dubroy/status/1720121014674133033 ∙ Archived on 2025-03-28.