Title: Performance degradation of Buffer allocation in NodeJS v24 · Issue #61967 · nodejs/node · GitHub
Open Graph Title: Performance degradation of Buffer allocation in NodeJS v24 · Issue #61967 · nodejs/node
X Title: Performance degradation of Buffer allocation in NodeJS v24 · Issue #61967 · nodejs/node
Description: Version v24.13.0 Platform Linux ubuntu24 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Subsystem No response What steps will reproduce the bug? console.log(process.versi...
Open Graph Description: Version v24.13.0 Platform Linux ubuntu24 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Subsystem No response What steps will repr...
X Description: Version v24.13.0 Platform Linux ubuntu24 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Subsystem No response What steps will repr...
Opengraph URL: https://github.com/nodejs/node/issues/61967
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Performance degradation of Buffer allocation in NodeJS v24","articleBody":"### Version\n\nv24.13.0\n\n### Platform\n\n```text\nLinux ubuntu24 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2 x86_64 x86_64 x86_64 GNU/Linux\n```\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\n```\nconsole.log(process.version);\nlet table = [], count = 1e6;\nfor (let chunk_size of [10, 20, 50, 100, 200].map(v=>v*1024))\n{\n let ts = Date.now();\n for (let i = 0; i\u003ccount; i++)\n Buffer.allocUnsafe(chunk_size);\n let te = Date.now();\n table.push({chunk_size, ms: te-ts});\n}\nconsole.table(table, ['chunk_size', 'ms']);\n```\n\n### How often does it reproduce? Is there a required condition?\n\nEvery time\n\n### What is the expected behavior? Why is that the expected behavior?\n\nBuffer allocation in NodeJS v24 should be same or better than in v20.\n\n### What do you see instead?\n\nDegradation depended on chunk size:\n```\nv20.12.1\n┌─────────┬────────────┬──────┐\n│ (index) │ chunk_size │ ms │\n├─────────┼────────────┼──────┤\n│ 0 │ 10240 │ 1044 │\n│ 1 │ 20480 │ 1110 │\n│ 2 │ 51200 │ 1230 │\n│ 3 │ 102400 │ 1339 │\n│ 4 │ 204800 │ 1969 │\n└─────────┴────────────┴──────┘\n\n\nv24.13.0\n┌─────────┬────────────┬──────┐\n│ (index) │ chunk_size │ ms │\n├─────────┼────────────┼──────┤\n│ 0 │ 10240 │ 996 │\n│ 1 │ 20480 │ 1223 │\n│ 2 │ 51200 │ 1387 │\n│ 3 │ 102400 │ 2077 │\n│ 4 │ 204800 │ 3349 │\n└─────────┴────────────┴──────┘\n```\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/damanis","@type":"Person","name":"damanis"},"datePublished":"2026-02-24T15:46:26Z","url":"https://github.com/nodejs/node/issues/61967"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ecee6ed7-3d2d-4d19-d26b-bd9441265666 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE8A:22D42F:715326:92C67D:6AED2FFA |
| html-safe-nonce | e04e100a1a0ecd130b7748bd9ee97ac8291488b63f4f9ba7057327f0d8a1f7b8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRThBOjIyRDQyRjo3MTUzMjY6OTJDNjdEOjZBRUQyRkZBIiwidmlzaXRvcl9pZCI6IjQyMTMwODg3NDQ2MDMxMTU0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f30834fdcd48586e4f0c5dacdf47b9ccc43193af65e66d47a6e991e409915a73 |
| hovercard-subject-tag | issue:3984439323 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/61967/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e1561bc05d124e7f952190c291a25fc32fa4244620ee2f80b12daeec18acbf31/nodejs/node/issues/61967 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e1561bc05d124e7f952190c291a25fc32fa4244620ee2f80b12daeec18acbf31/nodejs/node/issues/61967 |
| og:image:alt | Version v24.13.0 Platform Linux ubuntu24 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Subsystem No response What steps will repr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | damanis |
| hostname | github.com |
| expected-hostname | github.com |
| None | e51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ebb7b901cc154ecc179a44f266fcf69f343b30 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width