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 <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • 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
Original file line number Diff line number Diff line change
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.