Add benchmarks and add tiny performance improvements (#6)

* Add some benchmarks

* Replace extend -> extend_from_slice (1-2% performance improvement)

* Add many_blocks benchmarks
This commit is contained in:
Alexander Theißen
2022-01-24 21:20:47 +01:00
committed by GitHub
parent 184b3f8b3a
commit 8291876394
15 changed files with 62 additions and 2 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ pub fn generate_thunks(
for (arg_idx, _) in thunk.signature.params().iter().enumerate() {
thunk_body.push(elements::Instruction::GetLocal(arg_idx as u32));
}
thunk_body.extend(instrumented_call.iter().cloned());
thunk_body.extend_from_slice(&instrumented_call);
thunk_body.push(elements::Instruction::End);
// TODO: Don't generate a signature, but find an existing one.