From bb1f5e4262940a966e6314f57a4267514911d262 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Sun, 30 Apr 2023 10:50:24 +0200 Subject: perf(core): async op pseudo-codegen and performance work (#18887) Performance: ``` async_ops.js: 760k -> 1030k (!) async_ops_deferred.js: 730k -> 770k Deno.serve bench: 118k -> 124k WS test w/ third_party/prebuilt/mac/load_test 100 localhost 8000 0 0: unchanged Startup time: approx 0.5ms slower (13.7 -> 14.2ms) ``` --- cli/bench/async_ops.js | 4 +++- cli/bench/async_ops_deferred.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'cli/bench') diff --git a/cli/bench/async_ops.js b/cli/bench/async_ops.js index fc04942be..f6c1465d2 100644 --- a/cli/bench/async_ops.js +++ b/cli/bench/async_ops.js @@ -17,4 +17,6 @@ async function bench(fun) { } const core = Deno[Deno.internal].core; -bench(() => core.opAsync("op_void_async")); +const ops = core.ops; +const opVoidAsync = ops.op_void_async; +bench(() => opVoidAsync()); diff --git a/cli/bench/async_ops_deferred.js b/cli/bench/async_ops_deferred.js index 7a816cf95..2751ad226 100644 --- a/cli/bench/async_ops_deferred.js +++ b/cli/bench/async_ops_deferred.js @@ -17,4 +17,6 @@ async function bench(fun) { } const core = Deno[Deno.internal].core; -bench(() => core.opAsync("op_void_async_deferred")); +const ops = core.ops; +const opVoidAsyncDeferred = ops.op_void_async_deferred; +bench(() => opVoidAsyncDeferred()); -- cgit v1.2.3