diff options
Diffstat (limited to 'bench/snippets')
-rw-r--r-- | bench/snippets/noop.js | 13 |
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 () { |