Skip to content

Conversation

@gurgunday
Copy link
Member

@gurgunday gurgunday commented Oct 24, 2025

copyImpl is only used here, and removing the extra function call speeds up the copy benchmarks locally, we might need to confirm with a CI benchmark

After:

./node benchmark/run.js --filter buffer-copy buffers
buffers/buffer-copy.js
buffers/buffer-copy.js n=6000000 partial="true" bytes=8: 40,825,618.66360032
buffers/buffer-copy.js n=6000000 partial="false" bytes=8: 41,791,921.40845294
buffers/buffer-copy.js n=6000000 partial="true" bytes=128: 40,704,446.8970532
buffers/buffer-copy.js n=6000000 partial="false" bytes=128: 38,294,338.26186785
buffers/buffer-copy.js n=6000000 partial="true" bytes=1024: 27,828,082.06061716
buffers/buffer-copy.js n=6000000 partial="false" bytes=1024: 24,339,227.99011219

Before:

./node benchmark/run.js --filter buffer-copy buffers
buffers/buffer-copy.js
buffers/buffer-copy.js n=6000000 partial="true" bytes=8: 39,895,661.939214684
buffers/buffer-copy.js n=6000000 partial="false" bytes=8: 40,859,281.86584237
buffers/buffer-copy.js n=6000000 partial="true" bytes=128: 39,967,670.68408592
buffers/buffer-copy.js n=6000000 partial="false" bytes=128: 37,919,704.05339453
buffers/buffer-copy.js n=6000000 partial="true" bytes=1024: 27,719,259.341390397
buffers/buffer-copy.js n=6000000 partial="false" bytes=1024: 23,589,654.098257538

@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. needs-ci PRs that need a full CI run. labels Oct 24, 2025
@gurgunday gurgunday added needs-benchmark-ci PR that need a benchmark CI run. performance Issues and PRs related to the performance of Node.js. labels Oct 24, 2025
@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.58%. Comparing base (2bda7cb) to head (1f9abbe).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60396      +/-   ##
==========================================
+ Coverage   88.56%   88.58%   +0.01%     
==========================================
  Files         704      704              
  Lines      207774   207767       -7     
  Branches    40025    40023       -2     
==========================================
+ Hits       184022   184054      +32     
+ Misses      15807    15762      -45     
- Partials     7945     7951       +6     
Files with missing lines Coverage Δ
lib/buffer.js 100.00% <100.00%> (ø)

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gurgunday
Copy link
Member Author

Just realized we use this convention quite a lot, this is probably not worth it

@gurgunday gurgunday closed this Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buffer Issues and PRs related to the buffer subsystem. needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run. performance Issues and PRs related to the performance of Node.js.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants