summaryrefslogtreecommitdiff
path: root/cli/bench/deno_common.js
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-07-22 19:06:32 +0530
committerGitHub <noreply@github.com>2022-07-22 19:06:32 +0530
commit4db650ddd57b85475d71c0b9fc84d37becab9d6a (patch)
treee32602ab92d4c117dbbd72ea9c7436964466187d /cli/bench/deno_common.js
parent03dc3b8972f460e40d0b75fc3207cae9fe4f60da (diff)
Revert "feat(ops): V8 Fast Calls (#15122)" (#15276)
This reverts commit 03dc3b8972f460e40d0b75fc3207cae9fe4f60da.
Diffstat (limited to 'cli/bench/deno_common.js')
-rw-r--r--cli/bench/deno_common.js25
1 files changed, 1 insertions, 24 deletions
diff --git a/cli/bench/deno_common.js b/cli/bench/deno_common.js
index c02a6c883..c31ccd981 100644
--- a/cli/bench/deno_common.js
+++ b/cli/bench/deno_common.js
@@ -5,31 +5,8 @@ Deno.bench("date_now", { n: 5e5 }, () => {
Date.now();
});
-// Fast API calls
-{
- // deno-lint-ignore camelcase
- const { op_add } = Deno.core.ops;
- // deno-lint-ignore no-inner-declarations
- function add(a, b) {
- return op_add.call(a, b);
- }
- // deno-lint-ignore no-inner-declarations
- function addJS(a, b) {
- return a + b;
- }
- Deno.bench("op_add", { n: 1e7 }, () => add(1, 2));
- Deno.bench("add_js", { n: 1e7 }, () => addJS(1, 2));
-}
-
-// deno-lint-ignore camelcase
-const { op_void_sync } = Deno.core.ops;
-function sync() {
- return op_void_sync.call();
-}
-sync(); // Warmup
-console.log(sync());
// Void ops measure op-overhead
-Deno.bench("op_void_sync", { n: 1e7 }, () => sync());
+Deno.bench("op_void_sync", { n: 1e7 }, () => Deno.core.opSync("op_void_sync"));
Deno.bench(
"op_void_async",