blob: 9b9f1a1d12dbfae2d09e582919cf906b9a99d633 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import { bench, run } from "./runner.mjs";
var noop = globalThis[Symbol.for("Bun.lazy")]("noop");
var { function: noopFn, callback } = noop;
const noop2 = () => {};
bench("function", function () {
noopFn();
});
bench("JSC::call(() => {})", () => {
callback(noop2);
});
const bound = noop2.bind(null);
bench("bound call", () => {
bound();
});
bench("setter", function () {
noop.getterSetter = 1;
});
bench("getter", function () {
noop.getterSetter;
});
run();
|