From 217ce9199ae9f714cc00ff3200ed799bd8767f60 Mon Sep 17 00:00:00 2001 From: Turner Date: Thu, 16 Nov 2023 10:15:26 -0800 Subject: [PATCH 1/2] Add push and pop benches --- benches/benches/vm_set/mem.rs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/benches/benches/vm_set/mem.rs b/benches/benches/vm_set/mem.rs index 31484b03113..695bb3c8719 100644 --- a/benches/benches/vm_set/mem.rs +++ b/benches/benches/vm_set/mem.rs @@ -141,4 +141,36 @@ pub fn run(c: &mut Criterion) { ); } mem_meq.finish(); + + let full_mask = (1 << 24) - 1; + + // poph + let prepare_script = vec![op::pshh(full_mask)]; + run_group_ref( + &mut c.benchmark_group("poph"), + "poph", + VmBench::new(op::poph(full_mask)).with_prepare_script(prepare_script), + ); + + // popl + let prepare_script = vec![op::pshl(full_mask)]; + run_group_ref( + &mut c.benchmark_group("popl"), + "popl", + VmBench::new(op::popl(full_mask)).with_prepare_script(prepare_script), + ); + + // pshh + run_group_ref( + &mut c.benchmark_group("pshh"), + "pshh", + VmBench::new(op::pshh(full_mask)), + ); + + // pshl + run_group_ref( + &mut c.benchmark_group("pshl"), + "pshl", + VmBench::new(op::pshl(full_mask)), + ); } From 1206853787d2f64ccd9668a5cd58cd32256d0d5d Mon Sep 17 00:00:00 2001 From: Turner Date: Thu, 16 Nov 2023 10:39:00 -0800 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdc7d147ed9..88d7c1adf1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Description of the upcoming release here. ### Added +- [#1490](https://github.com/FuelLabs/fuel-core/pull/1490): Add push and pop benchmarks. - [#1485](https://github.com/FuelLabs/fuel-core/pull/1485): Prepare rc release of fuel core v0.21 - [#1476](https://github.com/FuelLabs/fuel-core/pull/1453): Add the majority of the "other" benchmarks for contract opcodes. - [#1453](https://github.com/FuelLabs/fuel-core/pull/1453): Add the majority of the "sanity" benchmarks for contract opcodes.