summaryrefslogtreecommitdiff
path: root/cli/bench
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-02-06 01:05:05 +0100
committerGitHub <noreply@github.com>2024-02-06 00:05:05 +0000
commit838f7c257fc0989acaf5013bfa970dc20bafe0d1 (patch)
treea8d59181cb404da2ee89021c6be9f155fd0bfd15 /cli/bench
parent6853633f7d4c66eeffd98a2b6184cd5caa4e9c98 (diff)
chore: remove benchmarks for ops (#22277)
These are not useful, as we bench them in `deno_core` already.
Diffstat (limited to 'cli/bench')
-rw-r--r--cli/bench/deno_common.js26
1 files changed, 3 insertions, 23 deletions
diff --git a/cli/bench/deno_common.js b/cli/bench/deno_common.js
index 954b0f631..a53045462 100644
--- a/cli/bench/deno_common.js
+++ b/cli/bench/deno_common.js
@@ -5,34 +5,14 @@ Deno.bench("date_now", { n: 5e5 }, () => {
Date.now();
});
-const { op_void_sync, op_void_async, op_add } = Deno[Deno.internal].core
- .ensureFastOps();
-
-// Fast API calls
-{
- // deno-lint-ignore no-inner-declarations
- function addJS(a, b) {
- return a + b;
- }
- Deno.bench("op_add", () => op_add(1, 2));
- Deno.bench("add_js", () => addJS(1, 2));
+function addJS(a, b) {
+ return a + b;
}
+Deno.bench("add_js", () => addJS(1, 2));
// Void ops measure op-overhead
Deno.bench("op_void_sync", () => op_void_sync());
-Deno.bench(
- "op_void_async",
- { n: 1e6 },
- () => op_void_async(),
-);
-
-Deno.bench(
- "op_void_await_async",
- { n: 1e6 },
- async () => await op_void_async(),
-);
-
// A very lightweight op, that should be highly optimizable
Deno.bench("perf_now", { n: 5e5 }, () => {
performance.now();