Skip to content

Conversation

@RafaelGSS
Copy link
Member

Following-up: #49593 (comment).

Turns out, it does have a difference for the first run @anonrig. See:

➜ node git:(main) ✗ node benchmark/fs/bench-accessSync.js # firstRun fs/bench-accessSync.js n=100000 type="existing": 1,522,375.115877485 fs/bench-accessSync.js n=100000 type="non-existing": 343,903.4938015694 fs/bench-accessSync.js n=100000 type="non-flat-existing": 1,375,793.3804884679 ➜ node git:(main) ✗ node benchmark/fs/bench-accessSync.js fs/bench-accessSync.js n=100000 type="existing": 1,316,668.6965309072 fs/bench-accessSync.js n=100000 type="non-existing": 330,345.1784036734 fs/bench-accessSync.js n=100000 type="non-flat-existing": 1,365,020.780120842 ➜ node git:(main) ✗ node benchmark/fs/bench-accessSync.js fs/bench-accessSync.js n=100000 type="existing": 1,348,179.7766454385 fs/bench-accessSync.js n=100000 type="non-existing": 294,858.29814902286 fs/bench-accessSync.js n=100000 type="non-flat-existing": 1,407,337.381426724 

To get a similar behaviour you need to ensure the fs cache isn't affected (usually waiting a bit before rerunning the bench). With the warmup, the results are more consistent (tested in a dedicated machine too).

@nodejs-github-botnodejs-github-bot added benchmark Issues and PRs related to the benchmark subsystem. fs Issues and PRs related to the fs subsystem / file system. labels Oct 7, 2023
Copy link
Member

@anonriganonrig left a comment

Choose a reason for hiding this comment

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

Nice catch. Thank you for the follow up

@anonriganonrig 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 Oct 7, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 7, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@anonriganonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 14, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 14, 2023
@nodejs-github-botnodejs-github-bot merged commit 3c0ec61 into nodejs:mainOct 14, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 3c0ec61

alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
targos pushed a commit that referenced this pull request Nov 11, 2023
@targostargos mentioned this pull request Nov 12, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.benchmarkIssues and PRs related to the benchmark subsystem.fsIssues and PRs related to the fs subsystem / file system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@RafaelGSS@nodejs-github-bot@anonrig