Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Dec 9, 2023

Conversation

lucshi
Copy link

@lucshi lucshi commented Nov 23, 2023

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

Fixes: #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%

@nodejs-github-bot nodejs-github-bot added benchmark Issues and PRs related to the benchmark subsystem. crypto Issues and PRs related to the crypto subsystem. labels Nov 23, 2023
@lucshi
Copy link
Author

lucshi commented Nov 24, 2023

Test ASan should not fail.

benchmark/crypto/randomBytes.js Outdated Show resolved Hide resolved
benchmark/crypto/randomBytes.js Show resolved Hide resolved
@H4ad
Copy link
Member

H4ad commented Nov 26, 2023

Test ASan should not fail.

No worries, I can restart later, sometimes it fails for no reason.

Also, can you update the first commit message to be similar to: Septa2112@a13bb22

@lucshi lucshi changed the title benchmark: increase iteration of randomBytes case to appropriate one benchmark: update iteration and size in benchmark/crypto/randomBytes.js Nov 27, 2023
@lucshi
Copy link
Author

lucshi commented Nov 27, 2023

Test ASan should not fail.

No worries, I can restart later, sometimes it fails for no reason.

Also, can you update the first commit message to be similar to: Septa2112@a13bb22

Done.

Copy link
Member

@H4ad H4ad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with just a little fix on linter.

benchmark/crypto/randomBytes.js Outdated Show resolved Hide resolved
Co-authored-by: Vinicius Lourenço <12551007+H4ad@users.noreply.github.com>
@H4ad H4ad added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Dec 9, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 9, 2023
@nodejs-github-bot nodejs-github-bot merged commit e158b11 into nodejs:main Dec 9, 2023
23 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in e158b11

RafaelGSS pushed a commit that referenced this pull request Dec 15, 2023
Fixes: #50571
PR-URL: #50868
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Dec 15, 2023
richardlau pushed a commit that referenced this pull request Mar 25, 2024
Fixes: #50571
PR-URL: #50868
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
@richardlau richardlau mentioned this pull request Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark Issues and PRs related to the benchmark subsystem. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. crypto Issues and PRs related to the crypto subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The performance gap between node16 and node21 changes as the n of the benchmark changes
4 participants