From 0591d78e5b1c1c232fd6c6e4c159fd428f19ade9 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 21 Mar 2021 14:09:41 -0700 Subject: in real programs, having read_operands inlined hurts performance! the in-repo benchmark got better with this inlined but it's probably better to leave it up to the compiler when finally stitching stuff together. i suspect that having read_operands inlined resulted in just too many live values, and the compiler was inspired to play hijinks that pipelined poorly. disas-bench shows a ~15% improvement from this change. --- src/long_mode/mod.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index cb3d699..5ca6542 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -6367,7 +6367,6 @@ fn read_instr>(decoder: &InstDecoder, mut bytes_iter: T, in OperandCode::ModRM_0x8f_Ev => 30 */ -#[inline(always)] fn read_operands>(decoder: &InstDecoder, mut bytes_iter: T, instruction: &mut Instruction, operand_code: OperandCode, length: &mut u8) -> Result<(), DecodeError> { instruction.operands[0] = OperandSpec::RegRRR; instruction.operand_count = 2; -- cgit v1.1