diff options
author | 2022-07-12 04:40:12 -0400 | |
---|---|---|
committer | 2022-07-12 01:40:12 -0700 | |
commit | a9e4ff2029a769737982fcf7e0b7d76d35cf35e4 (patch) | |
tree | 497832408d926e2bed779fcec4ba655624a29792 /bench/snippets/noop.js | |
parent | 7eea306b0ff46a27f134809a9b3c12bf4b38fa7e (diff) | |
download | bun-a9e4ff2029a769737982fcf7e0b7d76d35cf35e4.tar.gz bun-a9e4ff2029a769737982fcf7e0b7d76d35cf35e4.tar.zst bun-a9e4ff2029a769737982fcf7e0b7d76d35cf35e4.zip |
cleanup benchmarks folder (#587)
* cleanup benchmarks
* run prettier
Diffstat (limited to 'bench/snippets/noop.js')
-rw-r--r-- | bench/snippets/noop.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bench/snippets/noop.js b/bench/snippets/noop.js new file mode 100644 index 000000000..789e6abbb --- /dev/null +++ b/bench/snippets/noop.js @@ -0,0 +1,17 @@ +import { bench, run } from "mitata"; + +var noop = globalThis[Symbol.for("Bun.lazy")]("noop"); + +bench("function", function () { + noop.function(); +}); + +bench("setter", function () { + noop.getterSetter = 1; +}); + +bench("getter", function () { + noop.getterSetter; +}); + +run(); |