diff options
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"); -} |