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 danielleadams committed Jan 3, 2023
1 parent 10cc827 commit ab891ec
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 ab891ec

Please sign in to comment.