René's URL Explorer Experiment


Title: buffer: optimize buffer.concat performance by mertcanaltin · Pull Request #61721 · nodejs/node · GitHub

Open Graph Title: buffer: optimize buffer.concat performance by mertcanaltin · Pull Request #61721 · nodejs/node

X Title: buffer: optimize buffer.concat performance by mertcanaltin · Pull Request #61721 · nodejs/node

Description: Removed the _copyActual indirection in the copy loop and called TypedArrayPrototypeSet directly. Split auto-length and explicit-length paths so the auto-length copy loop is branch free. Replaced Buffer.allocUnsafe with allocate to skip redundant validation. benchmark results: ➜ node git:(mert/buffer-concat-optimize-js) ✗ node-benchmark-compare ./result.csv confidence improvement accuracy (*) (**) (***) buffers/buffer-concat-fill.js n=800000 extraSize=1 * 10.37 % ±9.47% ±13.37% ±19.13% buffers/buffer-concat-fill.js n=800000 extraSize=1024 2.91 % ±6.22% ±8.53% ±11.62% buffers/buffer-concat-fill.js n=800000 extraSize=256 * 7.05 % ±6.13% ±8.41% ±11.49% buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=1 pieces=16 ** 1.76 % ±1.18% ±1.64% ±2.26% buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=1 pieces=4 *** 5.20 % ±1.21% ±1.65% ±2.25% buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=16 pieces=16 ** 1.96 % ±1.17% ±1.61% ±2.21% buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=16 pieces=4 *** 3.06 % ±1.50% ±2.06% ±2.84% buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=256 pieces=16 1.93 % ±8.35% ±11.48% ±15.73% buffers/buffer-concat.js n=800000 withTotalLength=0 pieceSize=256 pieces=4 2.37 % ±6.69% ±9.34% ±13.12% buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=1 pieces=16 -0.59 % ±0.99% ±1.36% ±1.86% buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=1 pieces=4 *** 5.17 % ±1.25% ±1.71% ±2.33% buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=16 pieces=16 0.98 % ±1.45% ±2.02% ±2.81% buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=16 pieces=4 *** 4.44 % ±1.89% ±2.62% ±3.62% buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=256 pieces=16 * -1.97 % ±1.89% ±2.63% ±3.67% buffers/buffer-concat.js n=800000 withTotalLength=1 pieceSize=256 pieces=4 *** 3.55 % ±1.08% ±1.49% ±2.04% Be aware that when doing many comparisons the risk of a false-positive result increases. In this case, there are 15 comparisons, you can thus expect the following amount of false-positive results: 0.75 false positives, when considering a 5% risk acceptance (*, **, ***), 0.15 false positives, when considering a 1% risk acceptance (**, ***), 0.01 false positives, when considering a 0.1% risk acceptance (***) ➜ node git:(mert/buffer-concat-optimize-js) ✗

Open Graph Description: Removed the _copyActual indirection in the copy loop and called TypedArrayPrototypeSet directly. Split auto-length and explicit-length paths so the auto-length copy loop is branch free. Replaced Bu...

X Description: Removed the _copyActual indirection in the copy loop and called TypedArrayPrototypeSet directly. Split auto-length and explicit-length paths so the auto-length copy loop is branch free. Replaced Bu...

Opengraph URL: https://github.com/nodejs/node/pull/61721

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:cc11efdf-19e5-42f6-2de8-3c3cb93d49f5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8300:1A1F1B:4AEF4DD:68F5D85:6A4F8A75
html-safe-nonce35c59ab534aed6c28455133ebb87f63287c66417f243910d8a8877f4ff98e69f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzAwOjFBMUYxQjo0QUVGNEREOjY4RjVEODU6NkE0RjhBNzUiLCJ2aXNpdG9yX2lkIjoiMjYzNTE2MDY1OTIxMDI0MjY3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacce1a9f19d7aed136a0785b09fd396adb6292f9ae5740025ede361ac6c972ca1f
hovercard-subject-tagpull_request:3257929382
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/nodejs/node/pull/61721/files
twitter:imagehttps://avatars.githubusercontent.com/u/37827216?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/37827216?s=400&v=4
og:image:altRemoved the _copyActual indirection in the copy loop and called TypedArrayPrototypeSet directly. Split auto-length and explicit-length paths so the auto-length copy loop is branch free. Replaced Bu...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4b249b445842943ed31549e027f57a8ade9881ed
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/pull/61721/changes#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F61721%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F61721%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/pull/61721/changes
Reloadhttps://github.com/nodejs/node/pull/61721/changes
Reloadhttps://github.com/nodejs/node/pull/61721/changes
Please reload this pagehttps://github.com/nodejs/node/pull/61721/changes
nodejs https://github.com/nodejs
nodehttps://github.com/nodejs/node
Please reload this pagehttps://github.com/nodejs/node/pull/61721/changes
Notifications https://github.com/login?return_to=%2Fnodejs%2Fnode
Fork 36k https://github.com/login?return_to=%2Fnodejs%2Fnode
Star 118k https://github.com/login?return_to=%2Fnodejs%2Fnode
Code https://github.com/nodejs/node
Issues 1.3k https://github.com/nodejs/node/issues
Pull requests 971 https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality 0 https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Code https://github.com/nodejs/node
Issues https://github.com/nodejs/node/issues
Pull requests https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
nodejs-github-bothttps://github.com/nodejs-github-bot
nodejs:mainhttps://github.com/nodejs/node/tree/main
mertcanaltin:mert/buffer-concat-optimize-jshttps://github.com/mertcanaltin/node/tree/mert/buffer-concat-optimize-js
Conversation 31 https://github.com/nodejs/node/pull/61721
Commits 7 https://github.com/nodejs/node/pull/61721/commits
Checks 42 https://github.com/nodejs/node/pull/61721/checks
Files changed 2 https://github.com/nodejs/node/pull/61721/files
buffer: optimize buffer.concat performance https://github.com/nodejs/node/pull/61721/changes#top
Show all changes 7 commits https://github.com/nodejs/node/pull/61721/files
7ded458 buffer: optimize buffer.concat performance mertcanaltin Feb 7, 2026 https://github.com/nodejs/node/pull/61721/commits/7ded458d1f28b1744c78fbaf925245a7ae815231
a7fd75d revert comment lines mertcanaltin Feb 7, 2026 https://github.com/nodejs/node/pull/61721/commits/a7fd75db7593fabfbdb95b9028738379ca44018a
885c7a3 revert comment lines mertcanaltin Feb 7, 2026 https://github.com/nodejs/node/pull/61721/commits/885c7a3b8d6274c1c26d19b955d805cce551d89e
ba806ae revert listLen caching mertcanaltin Feb 7, 2026 https://github.com/nodejs/node/pull/61721/commits/ba806ae30ef8373e257fad6b6d4f20b4022fb2ab
559f5e9 move type validation before allocation mertcanaltin Feb 7, 2026 https://github.com/nodejs/node/pull/61721/commits/559f5e943135ee708632656bca4aa2e3bca57967
1898304 use TypedArrayPrototypeGetByteLength mertcanaltin Feb 8, 2026 https://github.com/nodejs/node/pull/61721/commits/189830411d1b627d7c5829362e9c4caf80f1847f
4848305 add test for spoofed length getter in concat mertcanaltin Feb 10, 2026 https://github.com/nodejs/node/pull/61721/commits/48483056c7160532313c1fa9d035525a683e3433
Clear filters https://github.com/nodejs/node/pull/61721/files
Please reload this pagehttps://github.com/nodejs/node/pull/61721/changes
Please reload this pagehttps://github.com/nodejs/node/pull/61721/changes
buffer.js https://github.com/nodejs/node/pull/61721/changes#diff-3c2cd5c512dd026a7765b6b2ae3f85785d3b7ea3795e11949892b7b73beee630
test-buffer-concat.js https://github.com/nodejs/node/pull/61721/changes#diff-5c1c07649659fcabbb82766b4462816fe714811bd96b638c30c1fc30fa8b2b64
lib/buffer.jshttps://github.com/nodejs/node/pull/61721/changes#diff-3c2cd5c512dd026a7765b6b2ae3f85785d3b7ea3795e11949892b7b73beee630
View file https://github.com/mertcanaltin/node/blob/48483056c7160532313c1fa9d035525a683e3433/lib/buffer.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/61721/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/61721/changes#diff-3c2cd5c512dd026a7765b6b2ae3f85785d3b7ea3795e11949892b7b73beee630
https://github.com/nodejs/node/pull/61721/changes#diff-3c2cd5c512dd026a7765b6b2ae3f85785d3b7ea3795e11949892b7b73beee630
https://github.com/nodejs/node/pull/61721/changes#diff-3c2cd5c512dd026a7765b6b2ae3f85785d3b7ea3795e11949892b7b73beee630
Please reload this pagehttps://github.com/nodejs/node/pull/61721/changes
Please reload this pagehttps://github.com/nodejs/node/pull/61721/changes
Please reload this pagehttps://github.com/nodejs/node/pull/61721/changes
https://github.com/nodejs/node/pull/61721/changes#diff-3c2cd5c512dd026a7765b6b2ae3f85785d3b7ea3795e11949892b7b73beee630
test/parallel/test-buffer-concat.jshttps://github.com/nodejs/node/pull/61721/changes#diff-5c1c07649659fcabbb82766b4462816fe714811bd96b638c30c1fc30fa8b2b64
View file https://github.com/mertcanaltin/node/blob/48483056c7160532313c1fa9d035525a683e3433/test/parallel/test-buffer-concat.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/61721/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/61721/changes#diff-5c1c07649659fcabbb82766b4462816fe714811bd96b638c30c1fc30fa8b2b64
Please reload this pagehttps://github.com/nodejs/node/pull/61721/changes
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.