diff options
| author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-10-28 04:20:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-28 16:50:17 +0530 |
| commit | e18950284f279cfa8ec090cb8a882dbd64e92d4a (patch) | |
| tree | 2ba6be798fe8d2393f7701693c1c545a237a2575 /bench_util | |
| parent | d9e425a9472981e8a1df025c29bbad609123e783 (diff) | |
Reland "perf(core): generate inlined wrappers for async ops" (#16455)
Reland https://github.com/denoland/deno/pull/16428
Diffstat (limited to 'bench_util')
| -rw-r--r-- | bench_util/js_runtime.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bench_util/js_runtime.rs b/bench_util/js_runtime.rs index 06dd79fae..f87fa3b03 100644 --- a/bench_util/js_runtime.rs +++ b/bench_util/js_runtime.rs @@ -63,7 +63,6 @@ pub fn bench_js_sync_with( let code = v8::String::new(scope, looped_src.as_ref()).unwrap(); let script = v8::Script::compile(scope, code, None).unwrap(); - // Run once if profiling, otherwise regular bench loop if is_profiling() { script.run(scope).unwrap(); @@ -102,7 +101,9 @@ pub fn bench_js_async_with( }; let looped = loop_code(inner_iters, src); let src = looped.as_ref(); - + runtime + .execute_script("init", "Deno.core.initializeAsyncOps();") + .unwrap(); if is_profiling() { for _ in 0..opts.profiling_outer { tokio_runtime.block_on(inner_async(src, &mut runtime)); |
