3 ms·
He might be talking about having to implement a register allocator/file in order to interpret stack machines faster. Something you get from the compilers on reg
by fwsgonzo 3y ago
He might be talking about having to implement a register allocator/file in order to interpret stack machines faster. Something you get from the compilers on register architectures like RISC-V, ARM and x86.
wasmtime uses cranelift, which has a complex register allocator. wasm3 uses a simple register file.
> In M3/Wasm, the stack machine model is translated into a more direct and efficient "register file" approach.
https://github.com/wasm3/wasm3/blob/main/docs/Interpreter.md https://github.com/wasm3/wasm3/blob/main/docs/Interpreter.md
- miohtama 3y agoBecause registers on x86 and RISC-V are different, you still need to have a register file to map those, no?
- fwsgonzo 3y agoOnly for binary translation or just-in-time compilation (basically producing native code). If you're interpreting RISC-V you can just pretend the registers are an array of register-sized integers. Which is what they are.
- charcircuit 3y ago>registers are an array of register-sized integers A "register file" is the name of such an array.