diff options
Diffstat (limited to 'bench/ffi/deno.js')
-rw-r--r-- | bench/ffi/deno.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bench/ffi/deno.js b/bench/ffi/deno.js index ae971a344..0b4832f1a 100644 --- a/bench/ffi/deno.js +++ b/bench/ffi/deno.js @@ -11,17 +11,15 @@ const { } = Deno.dlopen(path, { ffi_noop: { parameters: [], result: "void" }, ffi_string: { parameters: [], result: "pointer" }, - ffi_hash: { parameters: ["pointer", "u32"], result: "u32" }, + ffi_hash: { parameters: ["buffer", "u32"], result: "u32" }, }); const bytes = new Uint8Array(64); group("deno:ffi", () => { bench("noop", () => ffi_noop()); - bench("hash", () => ffi_hash(Deno.UnsafePointer.of(bytes), bytes.byteLength)); - bench("c string", () => - new Deno.UnsafePointerView(ffi_string()).getCString() - ); + bench("hash", () => ffi_hash(bytes, bytes.byteLength)); + bench("c string", () => Deno.UnsafePointerView.getCString(ffi_string())); }); await run(); |