Improve efficiency of fetching next opcode #39
Labels
data structures
Area: internal data structures
easy
Little experience and/or subject matter knowledge required
See
interpreter/src/bytecode.rs:293
- multiple dereferences required to fetch a single opcode.Ideal state: an instruction pointer that is a pointer to the next opcode.
Realistically: that might not be sensible, given that we probably want to retain bounds checking; what about extending
Array
with aRefCell
-styleArrayOpcode
slice borrow? That's as close to bare pointer in safe Rust as we can get.Files:
interpreter/src/bytecode.rs:293
booksrc/chapter-interp-bytecode.md
The text was updated successfully, but these errors were encountered: