GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — benchmark: increase the iteration number to an appropriate value by lucshi · Pull Request #50766 · nodejs/node

Conversation

@lucshi

@lucshi lucshi commented Nov 17, 2023

Copy link
Copy Markdown

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 about 50% to 100X higher and stable score.

Before (n == 1e3)

crypto/webcrypto-digest.js n=1000 method="SHA-1" data=10 sync="createHash": 222,039.26187044097
crypto/webcrypto-digest.js n=1000 method="SHA-256" data=10 sync="createHash": 219,216.61626876658
crypto/webcrypto-digest.js n=1000 method="SHA-384" data=10 sync="createHash": 206,463.2920654505
crypto/webcrypto-digest.js n=1000 method="SHA-512" data=10 sync="createHash": 207,605.45994055425
crypto/webcrypto-digest.js n=1000 method="SHA-1" data=20 sync="createHash": 223,194.50709390262
crypto/webcrypto-digest.js n=1000 method="SHA-256" data=20 sync="createHash": 223,021.1334826088
crypto/webcrypto-digest.js n=1000 method="SHA-384" data=20 sync="createHash": 209,489.84822669983
crypto/webcrypto-digest.js n=1000 method="SHA-512" data=20 sync="createHash": 209,359.23721218077
crypto/webcrypto-digest.js n=1000 method="SHA-1" data=50 sync="createHash": 224,466.94151895432
crypto/webcrypto-digest.js n=1000 method="SHA-256" data=50 sync="createHash": 219,220.26857990422
crypto/webcrypto-digest.js n=1000 method="SHA-384" data=50 sync="createHash": 210,305.60559076423
crypto/webcrypto-digest.js n=1000 method="SHA-512" data=50 sync="createHash": 209,618.3374121568
crypto/webcrypto-digest.js n=1000 method="SHA-1" data=100 sync="createHash": 223,763.10468622597
crypto/webcrypto-digest.js n=1000 method="SHA-256" data=100 sync="createHash": 222,396.92736405155
crypto/webcrypto-digest.js n=1000 method="SHA-384" data=100 sync="createHash": 207,965.92686254284
crypto/webcrypto-digest.js n=1000 method="SHA-512" data=100 sync="createHash": 208,727.2625565625
crypto/webcrypto-digest.js n=1000 method="SHA-1" data=10 sync="subtle": 98,612.53154245087
crypto/webcrypto-digest.js n=1000 method="SHA-256" data=10 sync="subtle": 96,922.1686878008
crypto/webcrypto-digest.js n=1000 method="SHA-384" data=10 sync="subtle": 96,870.00423225049
crypto/webcrypto-digest.js n=1000 method="SHA-512" data=10 sync="subtle": 96,007.99708212496
crypto/webcrypto-digest.js n=1000 method="SHA-1" data=20 sync="subtle": 98,065.63572225145
crypto/webcrypto-digest.js n=1000 method="SHA-256" data=20 sync="subtle": 98,296.24108293361
crypto/webcrypto-digest.js n=1000 method="SHA-384" data=20 sync="subtle": 96,885.06756958383
crypto/webcrypto-digest.js n=1000 method="SHA-512" data=20 sync="subtle": 96,270.33325708723
crypto/webcrypto-digest.js n=1000 method="SHA-1" data=50 sync="subtle": 95,954.52830049273
crypto/webcrypto-digest.js n=1000 method="SHA-256" data=50 sync="subtle": 97,504.15684596673
crypto/webcrypto-digest.js n=1000 method="SHA-384" data=50 sync="subtle": 95,558.87272255732
crypto/webcrypto-digest.js n=1000 method="SHA-512" data=50 sync="subtle": 96,579.1099771436
crypto/webcrypto-digest.js n=1000 method="SHA-1" data=100 sync="subtle": 95,271.41301224582
crypto/webcrypto-digest.js n=1000 method="SHA-256" data=100 sync="subtle": 95,621.24501347159
crypto/webcrypto-digest.js n=1000 method="SHA-384" data=100 sync="subtle": 95,226.87660510853
crypto/webcrypto-digest.js n=1000 method="SHA-512" data=100 sync="subtle": 93,765.51233194642

After (n == 1e5)

crypto/webcrypto-digest.js n=100000 method="SHA-1" data=10 sync="createHash": 415,274.05377886206
crypto/webcrypto-digest.js n=100000 method="SHA-256" data=10 sync="createHash": 417,149.6738452703
crypto/webcrypto-digest.js n=100000 method="SHA-384" data=10 sync="createHash": 376,980.2172355287
crypto/webcrypto-digest.js n=100000 method="SHA-512" data=10 sync="createHash": 372,715.0975820119
crypto/webcrypto-digest.js n=100000 method="SHA-1" data=20 sync="createHash": 430,181.83639962785
crypto/webcrypto-digest.js n=100000 method="SHA-256" data=20 sync="createHash": 419,084.5224332802
crypto/webcrypto-digest.js n=100000 method="SHA-384" data=20 sync="createHash": 376,547.25573734415
crypto/webcrypto-digest.js n=100000 method="SHA-512" data=20 sync="createHash": 370,234.4655255085
crypto/webcrypto-digest.js n=100000 method="SHA-1" data=50 sync="createHash": 423,742.27455861174
crypto/webcrypto-digest.js n=100000 method="SHA-256" data=50 sync="createHash": 395,833.20006948936
crypto/webcrypto-digest.js n=100000 method="SHA-384" data=50 sync="createHash": 379,050.974623447
crypto/webcrypto-digest.js n=100000 method="SHA-512" data=50 sync="createHash": 375,675.6197304685
crypto/webcrypto-digest.js n=100000 method="SHA-1" data=100 sync="createHash": 421,568.2032789735
crypto/webcrypto-digest.js n=100000 method="SHA-256" data=100 sync="createHash": 407,834.3543901419
crypto/webcrypto-digest.js n=100000 method="SHA-384" data=100 sync="createHash": 372,268.2060939776
crypto/webcrypto-digest.js n=100000 method="SHA-512" data=100 sync="createHash": 379,056.31670779944
crypto/webcrypto-digest.js n=100000 method="SHA-1" data=10 sync="subtle": 148,302.19260164732
crypto/webcrypto-digest.js n=100000 method="SHA-256" data=10 sync="subtle": 147,238.89019628844
crypto/webcrypto-digest.js n=100000 method="SHA-384" data=10 sync="subtle": 146,129.28974494382
crypto/webcrypto-digest.js n=100000 method="SHA-512" data=10 sync="subtle": 131,636.1514168684
crypto/webcrypto-digest.js n=100000 method="SHA-1" data=20 sync="subtle": 126,594.01903468177
crypto/webcrypto-digest.js n=100000 method="SHA-256" data=20 sync="subtle": 145,318.21012920764
crypto/webcrypto-digest.js n=100000 method="SHA-384" data=20 sync="subtle": 144,951.76649521643
crypto/webcrypto-digest.js n=100000 method="SHA-512" data=20 sync="subtle": 144,832.58315076123
crypto/webcrypto-digest.js n=100000 method="SHA-1" data=50 sync="subtle": 143,897.2475802149
crypto/webcrypto-digest.js n=100000 method="SHA-256" data=50 sync="subtle": 143,150.88827538266
crypto/webcrypto-digest.js n=100000 method="SHA-384" data=50 sync="subtle": 144,435.63972808863
crypto/webcrypto-digest.js n=100000 method="SHA-512" data=50 sync="subtle": 144,699.0298307714
crypto/webcrypto-digest.js n=100000 method="SHA-1" data=100 sync="subtle": 143,925.53210068002
crypto/webcrypto-digest.js n=100000 method="SHA-256" data=100 sync="subtle": 144,552.87612665596
crypto/webcrypto-digest.js n=100000 method="SHA-384" data=100 sync="subtle": 143,831.10380643434
crypto/webcrypto-digest.js n=100000 method="SHA-512" data=100 sync="subtle": 144,501.80167302856

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Lei Shi
benchmark: increase the iteration number to an appropriate value
1890810
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.
@nodejs-github-bot nodejs-github-bot added benchmark Issues and PRs related to Node.js benchmarks and benchmarking infrastructure. crypto Issues and PRs related to the crypto subsystem. labels Nov 17, 2023
debadree25
debadree25 approved these changes Nov 17, 2023
View reviewed changes

@debadree25 debadree25 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

lgtm
does this have any adverse impact on the benchmark running times?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lucshi

lucshi commented Nov 17, 2023

Copy link
Copy Markdown
Author

lgtm does this have any adverse impact on the benchmark running times?

yes, the running duration increased a bit but acceptable. Thanks!

debadree25 and H4ad reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@debadree25 debadree25 added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Nov 17, 2023
panva
panva approved these changes Nov 17, 2023
View reviewed changes
@panva panva added the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 17, 2023
H4ad
H4ad approved these changes Nov 17, 2023
View reviewed changes

@H4ad H4ad left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks!

Just to keep the track, ref: #50571

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 19, 2023
@nodejs-github-bot
nodejs-github-bot merged commit bae7e38 into nodejs:main Nov 19, 2023
@nodejs-github-bot

nodejs-github-bot commented Nov 19, 2023

Copy link
Copy Markdown
Collaborator

Landed in bae7e38

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos pushed a commit that referenced this pull request Nov 23, 2023
Lei Shi @targos
benchmark: increase the iteration number to an appropriate value
c822138
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]>
lucshi pushed a commit to lucshi/node that referenced this pull request Nov 27, 2023
Lei Shi
benchmark: increase the iteration number to an appropriate value
a9fa824
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: nodejs#50766
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Nov 28, 2023
v21.3.0 proposal #50954
Merged
RafaelGSS pushed a commit that referenced this pull request Nov 29, 2023
Lei Shi @RafaelGSS
benchmark: increase the iteration number to an appropriate value
36380eb
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]>
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
Lei Shi @UlisesGascon
benchmark: increase the iteration number to an appropriate value
cd1703e
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]>
@UlisesGascon UlisesGascon mentioned this pull request Dec 12, 2023
v20.11.0 proposal #51124
Merged
UlisesGascon pushed a commit that referenced this pull request Dec 19, 2023
Lei Shi @UlisesGascon
benchmark: increase the iteration number to an appropriate value
00f7a5d
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@panva panva panva approved these changes
@H4ad H4ad H4ad approved these changes
+1 more reviewer
@debadree25 debadree25 debadree25 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. benchmark Issues and PRs related to Node.js benchmarks and benchmarking infrastructure. crypto Issues and PRs related to the crypto subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@lucshi @nodejs-github-bot @panva @H4ad @debadree25
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.