Re:Faster interpreters in Go: Catching up with C++
by ncruces on Thursday March 20, 2025 @08:16PM
(#43430565)
Not the author.
Each instruction is an heap allocated closure, but it's allocated at “compile” time (when you generate the instruction from the AST), not at runtime (every time you run the instruction): by then they're (preallocated) free standing functions that receive the VM.
Every iteration of the loop in a big switch bytecode interpreter also requires a bounds checks.
Each instruction is an heap allocated closure, but it's allocated at “compile” time (when you generate the instruction from the AST), not at runtime (every time you run the instruction): by then they're (preallocated) free standing functions that receive the VM.
Every iteration of the loop in a big switch bytecode interpreter also requires a bounds checks.