summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-10-28 04:20:17 -0700
committerGitHub <noreply@github.com>2022-10-28 16:50:17 +0530
commite18950284f279cfa8ec090cb8a882dbd64e92d4a (patch)
tree2ba6be798fe8d2393f7701693c1c545a237a2575 /cli
parentd9e425a9472981e8a1df025c29bbad609123e783 (diff)
Reland "perf(core): generate inlined wrappers for async ops" (#16455)
Reland https://github.com/denoland/deno/pull/16428
Diffstat (limited to 'cli')
-rw-r--r--cli/bench/async_ops.js5
-rw-r--r--cli/tests/unit/metrics_test.ts2
2 files changed, 4 insertions, 3 deletions
diff --git a/cli/bench/async_ops.js b/cli/bench/async_ops.js
index ac4eb6858..2647accbd 100644
--- a/cli/bench/async_ops.js
+++ b/cli/bench/async_ops.js
@@ -5,7 +5,7 @@ let [total, count] = typeof Deno !== "undefined"
: [process.argv[2], process.argv[3]];
total = total ? parseInt(total, 0) : 50;
-count = count ? parseInt(count, 10) : 100000;
+count = count ? parseInt(count, 10) : 1000000;
async function bench(fun) {
const start = Date.now();
@@ -16,4 +16,5 @@ async function bench(fun) {
if (--total) queueMicrotask(() => bench(fun));
}
-bench(() => Deno.core.opAsync("op_void_async"));
+const { ops } = Deno.core;
+bench(() => ops.op_void_async());
diff --git a/cli/tests/unit/metrics_test.ts b/cli/tests/unit/metrics_test.ts
index 82ff7ddd0..7f78d4578 100644
--- a/cli/tests/unit/metrics_test.ts
+++ b/cli/tests/unit/metrics_test.ts
@@ -84,6 +84,6 @@ Deno.test(function opNamesMatch() {
// @ts-ignore: Deno.core allowed
Deno.core.opNames().sort(),
// @ts-ignore: Deno.core allowed
- Object.keys(Deno.core.ops).sort(),
+ Object.keys(Deno.core.ops).sort().filter((name) => name !== "asyncOpsInfo"),
);
});