Skip to content

Commit

Permalink
benchmark: fix text-decoder benchmark
Browse files Browse the repository at this point in the history
PR-URL: #45363
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
anonrig authored and RafaelGSS committed Nov 10, 2022
1 parent bf868fd commit 79f6bb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion benchmark/util/text-decoder.js
Expand Up @@ -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);
}

0 comments on commit 79f6bb0

Please sign in to comment.