mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-01 23:44:19 +01:00
Merge 'Introduce instruction VTABLE' from Lâm Hoàng Phúc
this PR improves 3-6% for `prepare` benchmark without slowing down others. After this PR we don't have to store `InsnFunction` in `Program` and `ProgramBuilder` anymore, because `to_function` will return result without matching. Reviewed-by: Preston Thorpe <preston@turso.tech> Closes #3098
This commit is contained in:
@@ -411,7 +411,8 @@ impl CompiledExpression {
|
||||
// Execute the program
|
||||
let mut pc = 0usize;
|
||||
while pc < program.insns.len() {
|
||||
let (insn, insn_fn) = &program.insns[pc];
|
||||
let (insn, _) = &program.insns[pc];
|
||||
let insn_fn = insn.to_function();
|
||||
state.pc = pc as u32;
|
||||
|
||||
// Execute the instruction
|
||||
|
||||
Reference in New Issue
Block a user