From 02187966c108fd50354c8de57bab443a5b262373 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Thu, 27 Oct 2022 06:40:48 -0700 Subject: perf(core): generate inlined wrappers for async ops (#16428) V8's JIT can do a better job knowing the argument count and also enable fast call path (in future). This also lets us call async ops without `opAsync`: ```js const { ops } = Deno.core; await ops.op_void_async(); ``` this patch: 4405286 ops/sec main: 3508771 ops/sec --- runtime/js/99_main.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/js') diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index afacd9b34..ef99969b2 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -692,6 +692,7 @@ delete Intl.v8BreakIterator; throw new Error("Worker runtime already bootstrapped"); } + core.initializeAsyncOps(); performance.setTimeOrigin(DateNow()); net.setup(runtimeOptions.unstableFlag); @@ -791,6 +792,7 @@ delete Intl.v8BreakIterator; throw new Error("Worker runtime already bootstrapped"); } + core.initializeAsyncOps(); performance.setTimeOrigin(DateNow()); net.setup(runtimeOptions.unstableFlag); -- cgit v1.2.3