From fdb7940c4e435a5b7f5a368f4168d748baf6b5b6 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sun, 18 Jun 2023 10:47:42 -0700 Subject: Fix a bunch of bugs (#3352) * Fix a bunch of bugs * undo that one * Fix crash in readdir() * woops * woops * Add comment * :scissors: * Make `readlink()` and `realpath` use much less memory * Update BunString.cpp * woopsie * Unnecessary * Don't commit these --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- bench/snippets/realpath.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bench/snippets/realpath.mjs') diff --git a/bench/snippets/realpath.mjs b/bench/snippets/realpath.mjs index 9c3793d80..4793ee3d6 100644 --- a/bench/snippets/realpath.mjs +++ b/bench/snippets/realpath.mjs @@ -1,4 +1,10 @@ import { realpathSync } from "node:fs"; const count = parseInt(process.env.ITERATIONS || "1", 10) || 1; const arg = process.argv[process.argv.length - 1]; -for (let i = 0; i < count; i++) realpathSync(arg); +import { bench, run } from "./runner.mjs"; + +bench("realpathSync x " + count, () => { + for (let i = 0; i < count; i++) realpathSync(arg, "utf-8"); +}); + +await run(); -- cgit v1.2.3