diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-18 18:30:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-18 18:30:04 -0400 |
commit | 3c9771deb2d615c47a2570023039c6a71f1c774b (patch) | |
tree | 759ce45a956798ddae58108286eafee29414d913 /bench_util/benches/op_baseline.rs | |
parent | a5ad3a44b5476909f12ae90501d8c7c451669be6 (diff) |
Reland "perf(core): preserve ops between snapshots (#18080)" (#18272)
Relanding 4b6305f4f25fc76f974bbdcc9cdb139d5ab8f5f4
Diffstat (limited to 'bench_util/benches/op_baseline.rs')
-rw-r--r-- | bench_util/benches/op_baseline.rs | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/bench_util/benches/op_baseline.rs b/bench_util/benches/op_baseline.rs index 89fb3d2f3..4b3bc0203 100644 --- a/bench_util/benches/op_baseline.rs +++ b/bench_util/benches/op_baseline.rs @@ -9,7 +9,14 @@ use deno_bench_util::bencher::Bencher; use deno_core::op; use deno_core::Extension; -deno_core::extension!(bench_setup, ops = [op_pi_json, op_pi_async, op_nop]); +deno_core::extension!( + bench_setup, + ops = [ + // op_pi_json, + op_pi_async, + op_nop + ] +); fn setup() -> Vec<Extension> { vec![bench_setup::init_ops()] @@ -18,10 +25,12 @@ fn setup() -> Vec<Extension> { #[op] fn op_nop() {} -#[op] -fn op_pi_json() -> i64 { - 314159 -} +// TODO(bartlomieju): reenable, currently this op generates a fast function, +// which is wrong, because i64 is not a compatible type for fast call. +// #[op] +// fn op_pi_json() -> i64 { +// 314159 +// } // this is a function since async closures aren't stable #[op] @@ -29,9 +38,9 @@ async fn op_pi_async() -> i64 { 314159 } -fn bench_op_pi_json(b: &mut Bencher) { - bench_js_sync(b, r#"Deno.core.ops.op_pi_json();"#, setup); -} +// fn bench_op_pi_json(b: &mut Bencher) { +// bench_js_sync(b, r#"Deno.core.ops.op_pi_json();"#, setup); +// } fn bench_op_nop(b: &mut Bencher) { bench_js_sync(b, r#"Deno.core.ops.op_nop();"#, setup); @@ -41,6 +50,11 @@ fn bench_op_async(b: &mut Bencher) { bench_js_async(b, r#"Deno.core.opAsync("op_pi_async");"#, setup); } -benchmark_group!(benches, bench_op_pi_json, bench_op_nop, bench_op_async,); +benchmark_group!( + benches, + // bench_op_pi_json, + bench_op_nop, + bench_op_async, +); bench_or_profile!(benches); |