Skip to content

Commit

Permalink
perf: avoid cloning original_bytes (#1646)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Jul 19, 2024
1 parent d980839 commit b995fad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/interpreter/src/instructions/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub fn codecopy<H: Host + ?Sized>(interpreter: &mut Interpreter, _host: &mut H)
memory_offset,
code_offset,
len,
&interpreter.contract.bytecode.original_bytes(),
interpreter.contract.bytecode.original_byte_slice(),
);
}

Expand Down
2 changes: 1 addition & 1 deletion crates/revm/src/context/inner_evm_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ impl<DB: Database> InnerEvmContext<DB> {
if code.is_eof() {
(EOF_MAGIC_BYTES.clone(), is_cold)
} else {
(code.original_bytes().clone(), is_cold)
(code.original_bytes(), is_cold)
}
})
}
Expand Down

0 comments on commit b995fad

Please sign in to comment.