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 danielleadams committed Dec 28, 2022
1 parent 5aca24b commit d8b1f6d
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 d8b1f6d

Please sign in to comment.