Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYagiz Nizipli <yagiz@nizipli.com>2022-11-07 17:06:54 +0300
committerNode.js GitHub Bot <github-bot@iojs.org>2022-11-09 17:17:29 +0300
commite3b3c4697c8769481713d5f69c2cc0902c27e3aa (patch)
tree8668a67e41828f410eca362cf31eeb4ff13e9421
parent9fe6dcf6cc013bf76140aac23a0f400e9b64171e (diff)
benchmark: fix text-decoder benchmark
PR-URL: https://github.com/nodejs/node/pull/45363 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
-rw-r--r--benchmark/util/text-decoder.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/benchmark/util/text-decoder.js b/benchmark/util/text-decoder.js
index ad845f7c92d..9a6fc97eab2 100644
--- a/benchmark/util/text-decoder.js
+++ b/benchmark/util/text-decoder.js
@@ -14,6 +14,8 @@ function main({ encoding, len, n, ignoreBOM }) {
const decoder = new TextDecoder(encoding, { ignoreBOM });
bench.start();
- decoder.decode(buf);
+ for (let i = 0; i < n; i++) {
+ decoder.decode(buf);
+ }
bench.end(n);
}