Skip to content

benchmark: update iteration and size in benchmark/crypto/randomBytes.js

Rodrigo Muino Tomonari requested to merge github/fork/lucshi/my-branch-4 into main

Increase iteration value from 1000 to 10000 to reflect real performance of randomBytes generation. The randomInt has no need to apply this.

Fixes: https://github.com/nodejs/node/issues/50571

Below is the score improvment measured on cascadelake server:

crypto/randomBytes.js size=64:  n=10000 percent=137.85%
crypto/randomBytes.js size=1024:  n=10000 percent=130.66%
crypto/randomBytes.js size=8192:  n=10000 percent=136.31%
crypto/randomBytes.js size=524288:  n=10000 percent=166.50%

Merge request reports

Loading