From 9e576dff7c39cfd510c60ba92aa0d1c15fd24a6b Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Fri, 19 Aug 2022 15:54:40 +0530 Subject: perf(runtime): optimize Deno.file open & stream (#15496) --- cli/bench/deno_common.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cli/bench/deno_common.js') diff --git a/cli/bench/deno_common.js b/cli/bench/deno_common.js index abafdc519..074346d28 100644 --- a/cli/bench/deno_common.js +++ b/cli/bench/deno_common.js @@ -23,6 +23,11 @@ Deno.bench("perf_now", { n: 5e5 }, () => { performance.now(); }); +Deno.bench("open_file_sync", () => { + const file = Deno.openSync("./cli/bench/testdata/128k.bin"); + file.close(); +}); + // A common "language feature", that should be fast // also a decent representation of a non-trivial JSON-op { -- cgit v1.2.3