aboutsummaryrefslogtreecommitdiff
path: root/bench/snippets/noop.js
diff options
context:
space:
mode:
Diffstat (limited to 'bench/snippets/noop.js')
-rw-r--r--bench/snippets/noop.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/bench/snippets/noop.js b/bench/snippets/noop.js
index 789e6abbb..d4fc03680 100644
--- a/bench/snippets/noop.js
+++ b/bench/snippets/noop.js
@@ -1,9 +1,20 @@
import { bench, run } from "mitata";
var noop = globalThis[Symbol.for("Bun.lazy")]("noop");
+var { function: noopFn, callback } = noop;
+const noop2 = () => {};
bench("function", function () {
- noop.function();
+ noopFn();
+});
+
+bench("JSC::call(() => {})", () => {
+ callback(noop2);
+});
+
+const bound = noop2.bind(null);
+bench("bound call", () => {
+ bound();
});
bench("setter", function () {