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 <debadree333@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
  • Loading branch information
lucshi authored and targos committed Nov 23, 2023
1 parent 278c768 commit c822138
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 c822138

Please sign in to comment.