benchmark: add large buffer sizes to buffer-creation#61979
Open
RajeshKumar11 wants to merge 1 commit intonodejs:mainfrom
Open
benchmark: add large buffer sizes to buffer-creation#61979RajeshKumar11 wants to merge 1 commit intonodejs:mainfrom
RajeshKumar11 wants to merge 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61979 +/- ##
==========================================
+ Coverage 88.84% 89.76% +0.92%
==========================================
Files 674 674
Lines 204957 205674 +717
Branches 39309 39437 +128
==========================================
+ Hits 182087 184630 +2543
+ Misses 15088 13271 -1817
+ Partials 7782 7773 -9
🚀 New features to boost your workflow:
|
The existing benchmark only covered sizes up to 8192 bytes. Sizes in the 10 KiB–204 KiB range show significant performance regression in Node.js v24 compared to v20 (see nodejs#61967). Add those sizes to make the regression reproducible and trackable via CI benchmarks. For large-size runs, override the default n via the CLI: node benchmark/buffers/buffer-creation.js \ type=fast-allocUnsafe len=204800 n=10000 Refs: nodejs#61967
94c1142 to
557164c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
10 KiB,51 KiB,102 KiB, and204 KiBto thelenparameter ofbenchmark/buffers/buffer-creation.jsRoot cause context
Issue #61967 reports significant
Buffer.allocUnsafe()regressions in v24 vs v20:The regression is limited to
Buffer.allocUnsafe()sizes that bypass the small-allocation pool (≥ 4096 bytes), and shows size-dependent scaling. Adding these sizes to the benchmark makes the regression reproducible and trackable via CI benchmark comparisons.To run with a smaller iteration count suitable for large sizes:
Test plan
node benchmark/buffers/buffer-creation.jscontinues to work for all existing sizes10240,52224,104448,208896can be selected vialen=argumentRefs: #61967