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 iterations in benchmark/util/splice-one.js #50698

Merged
merged 1 commit into from Nov 26, 2023

Conversation

Septa2112
Copy link
Contributor

Refs: #50571

In case util/splice-one.js, when only pos=end I found that the performance gap between node-21.x and node-20.x increased from -15% to 5% after I changed iterations from default 1e5 to 5e6. (node-20.x is the baseline.)

To make sure there was no problem with this modification, I tested the other 8 situations in this case (there are 9 situations in total, 3 types of pos, 3 types of size).

Here is the tests data and the new binary is node 21.x.

node-21.x vs node-20.x

  • pos=end
util/splice-one.js size=10 pos='end' n=100000        ***    -15.03 %       ±0.82% ±1.09% ±1.42%
util/splice-one.js size=10 pos='end' n=1000000        ***     -1.63 %       ±0.36% ±0.49% ±0.63%
util/splice-one.js size=10 pos='end' n=5000000        ***      5.07 %       ±0.52% ±0.70% ±0.93%

util/splice-one.js size=100 pos='end' n=100000        ***    -14.96 %       ±0.91% ±1.21% ±1.58%
util/splice-one.js size=100 pos='end' n=1000000        ***     -1.85 %       ±0.38% ±0.51% ±0.67%
util/splice-one.js size=100 pos='end' n=5000000        ***      4.59 %       ±0.20% ±0.26% ±0.35%

util/splice-one.js size=500 pos='end' n=100000        ***    -16.60 %       ±0.84% ±1.12% ±1.47%
util/splice-one.js size=500 pos='end' n=1000000        ***     -1.60 %       ±0.45% ±0.60% ±0.79%
util/splice-one.js size=500 pos='end' n=5000000        ***      4.61 %       ±0.20% ±0.26% ±0.35%
  • pos=middle
util/splice-one.js size=10 pos='middle' n=100000        ***     -4.40 %       ±0.84% ±1.12% ±1.46%
util/splice-one.js size=10 pos='middle' n=1000000                -0.70 %       ±2.08% ±2.79% ±3.69%
util/splice-one.js size=10 pos='middle' n=5000000        ***      2.64 %       ±0.37% ±0.50% ±0.65%

util/splice-one.js size=100 pos='middle' n=100000        ***     -1.69 %       ±0.43% ±0.58% ±0.75%
util/splice-one.js size=100 pos='middle' n=1000000         **      1.49 %       ±1.00% ±1.35% ±1.79%
util/splice-one.js size=100 pos='middle' n=5000000         **      1.60 %       ±1.05% ±1.42% ±1.88%

util/splice-one.js size=500 pos='middle' n=100000        ***     -0.79 %       ±0.28% ±0.37% ±0.49%
util/splice-one.js size=500 pos='middle' n=1000000        ***     -0.17 %       ±0.06% ±0.08% ±0.10%
util/splice-one.js size=500 pos='middle' n=5000000        ***     -0.11 %       ±0.04% ±0.06% ±0.07%
  • pos=start
util/splice-one.js size=10 pos='start' n=100000        ***     -4.13 %       ±0.57% ±0.75% ±0.98%
util/splice-one.js size=10 pos='start' n=1000000          *     -1.17 %       ±0.89% ±1.20% ±1.59%
util/splice-one.js size=10 pos='start' n=5000000        ***      0.36 %       ±0.16% ±0.22% ±0.28%

util/splice-one.js size=100 pos='start' n=100000        ***     -0.65 %       ±0.31% ±0.41% ±0.54%
util/splice-one.js size=100 pos='start' n=1000000         **      0.83 %       ±0.49% ±0.65% ±0.87%
util/splice-one.js size=100 pos='start' n=5000000        ***      1.16 %       ±0.52% ±0.69% ±0.92%

util/splice-one.js size=500 pos='start' n=100000          *     -0.14 %       ±0.12% ±0.15% ±0.20%
util/splice-one.js size=500 pos='start' n=1000000                -0.02 %       ±0.07% ±0.09% ±0.12%
util/splice-one.js size=500 pos='start' n=5000000                 0.02 %       ±0.11% ±0.14% ±0.19%

@nodejs-github-bot nodejs-github-bot added benchmark Issues and PRs related to the benchmark subsystem. util Issues and PRs related to the built-in util module. labels Nov 13, 2023
Increase the number of iterations from 1e5 to 5e6
to avoid the test performance gap caused by inactive
V8 optimization caused by insufficient number of iterations

Refs: nodejs#50571
@H4ad H4ad added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Nov 17, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 17, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@H4ad H4ad added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 26, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 26, 2023
@nodejs-github-bot nodejs-github-bot merged commit f8c27e6 into nodejs:main Nov 26, 2023
61 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in f8c27e6

martenrichter pushed a commit to martenrichter/node that referenced this pull request Nov 26, 2023
Increase the number of iterations from 1e5 to 5e6
to avoid the test performance gap caused by inactive
V8 optimization caused by insufficient number of iterations

Refs: nodejs#50571
PR-URL: nodejs#50698
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
lucshi pushed a commit to lucshi/node that referenced this pull request Nov 27, 2023
Increase the number of iterations from 1e5 to 5e6
to avoid the test performance gap caused by inactive
V8 optimization caused by insufficient number of iterations

Refs: nodejs#50571
PR-URL: nodejs#50698
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
RafaelGSS pushed a commit that referenced this pull request Nov 27, 2023
Increase the number of iterations from 1e5 to 5e6
to avoid the test performance gap caused by inactive
V8 optimization caused by insufficient number of iterations

Refs: #50571
PR-URL: #50698
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
@RafaelGSS RafaelGSS mentioned this pull request Nov 28, 2023
RafaelGSS pushed a commit that referenced this pull request Nov 29, 2023
Increase the number of iterations from 1e5 to 5e6
to avoid the test performance gap caused by inactive
V8 optimization caused by insufficient number of iterations

Refs: #50571
PR-URL: #50698
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
RafaelGSS pushed a commit that referenced this pull request Nov 30, 2023
Increase the number of iterations from 1e5 to 5e6
to avoid the test performance gap caused by inactive
V8 optimization caused by insufficient number of iterations

Refs: #50571
PR-URL: #50698
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
Increase the number of iterations from 1e5 to 5e6
to avoid the test performance gap caused by inactive
V8 optimization caused by insufficient number of iterations

Refs: #50571
PR-URL: #50698
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
@UlisesGascon UlisesGascon mentioned this pull request Dec 12, 2023
UlisesGascon pushed a commit that referenced this pull request Dec 13, 2023
Increase the number of iterations from 1e5 to 5e6
to avoid the test performance gap caused by inactive
V8 optimization caused by insufficient number of iterations

Refs: #50571
PR-URL: #50698
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
UlisesGascon pushed a commit that referenced this pull request Dec 15, 2023
Increase the number of iterations from 1e5 to 5e6
to avoid the test performance gap caused by inactive
V8 optimization caused by insufficient number of iterations

Refs: #50571
PR-URL: #50698
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
UlisesGascon pushed a commit that referenced this pull request Dec 19, 2023
Increase the number of iterations from 1e5 to 5e6
to avoid the test performance gap caused by inactive
V8 optimization caused by insufficient number of iterations

Refs: #50571
PR-URL: #50698
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. benchmark Issues and PRs related to the benchmark subsystem. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants