|
|
|
|
|
by dkersten
574 days ago
|
|
I've been playing around with this and its worth noting that pre-decoding the bytecode because it means every instruction (without operands) is the width of a pointer (8 bytes on x86) which means you fit far fewer instructions into cache, eg my opcodes are a byte, so that's 8x more instructions. I haven't had time to compare it in benchmarks to see what the real world difference is, but its worth keeping in mind. Somewhat off topic, looking at that assembly... mine compiles to (for one of the opcodes): movzx eax,BYTE PTR [rdi]
lea r9,[rip+0x1d6fd] # 2ae30 <instructions_table>
mov rax,QWORD PTR [r9+rax*8]
inc rdi
jmp rax
(also compiled from C++ with clang's musttail annotation) |
|