diff options
author | 2022-07-12 04:40:12 -0400 | |
---|---|---|
committer | 2022-07-12 01:40:12 -0700 | |
commit | a9e4ff2029a769737982fcf7e0b7d76d35cf35e4 (patch) | |
tree | 497832408d926e2bed779fcec4ba655624a29792 /bench/ffi/plus100/add3.deno.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/ffi/plus100/add3.deno.js')
-rw-r--r-- | bench/ffi/plus100/add3.deno.js | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/bench/ffi/plus100/add3.deno.js b/bench/ffi/plus100/add3.deno.js deleted file mode 100644 index 75508d39a..000000000 --- a/bench/ffi/plus100/add3.deno.js +++ /dev/null @@ -1,30 +0,0 @@ -import { run, bench, group, baseline } from "https://esm.sh/mitata"; - -const { - symbols: { add3: add3, noop }, - close, -} = Deno.dlopen("./plus100.dylib", { - add3: { - parameters: ["i32", "i32", "i32"], - result: "i32", - }, - noop: { - parameters: [], - result: "void", - }, -}); -bench("add3(1,2,3) ", () => { - add3(1, 2, 3); -}); - -bench("noop() ", () => { - noop(); -}); - -// collect option collects benchmark returned values into array -// prevents gc and can help with jit optimizing out functions -await run({ collect: false, percentiles: true }); - -if (add3(1, 2, 3) !== 1 + 2 + 3) { - throw new Error("add3(1) !== 101"); -} |