import { libSuffix } from "../../utility/deno.ts"; import { get_clock, get_offset } from "../../utility/proc_clock/deno.ts"; const library_file = "./tests/ffi/benchmark/external_call/lib."+libSuffix; let library = Deno.dlopen(library_file, { add: { parameters: ["i32", "i32"], result: "i32", }, }); function bench_add(bench_size: number) { let add = library.symbols.add; let value = 0; const before = get_clock(); for (let i=0; i