Skip to content

Commit

Permalink
benchmark: increase the iteration number to an appropriate value
Browse files Browse the repository at this point in the history
Current iteration number is too small that fwrite occupies large
portion of execution time which made crypo execution time measured
inaccurate. The iteration above 1e5 makes 50% higher and stable
score.

PR-URL: #50766
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
  • Loading branch information
Lei Shi authored and RafaelGSS committed Nov 29, 2023
1 parent f2e0fce commit 36380eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/crypto/webcrypto-digest.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
sync: ['createHash', 'subtle'],
data: [10, 20, 50, 100],
method: ['SHA-1', 'SHA-256', 'SHA-384', 'SHA-512'],
n: [1e3],
n: [1e5],
});

const kMethods = {
Expand Down

0 comments on commit 36380eb

Please sign in to comment.