GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Performance regression in Buffer.concat · Issue #45802 · nodejs/node Closed Labels bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js. DescriptionVersionv18.12.1 PlatformLinux ruby 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux SubsystemBuffer What steps will reproduce the bug?Run this under node v18 vs node v16 const randomBuffer = (length) => Buffer.from(Array.from({length}, () => Math.random() * 255)) const testCases = [ {bytesPerBuffer: 32, numBuffers: 10}, ] for (const {bytesPerBuffer, numBuffers} of testCases) { const results = [] for (let i = 0; i < 100_000; i++) { const buffers = Array.from({length: numBuffers}, () => randomBuffer(bytesPerBuffer)) const before = performance.now() Buffer.concat(buffers) const after = performance.now() results.push(after - before) } const avgTime = results.reduce((a, b) => a + b, 0) / results.length console.log(`concat ${numBuffers} buffers, ${bytesPerBuffer} each: ${avgTime}s`) } How often does it reproduce? Is there a required condition?Always reproduceable What is the expected behavior?Expected behavior is that there is no performance regression. What do you see instead?Buffer.concat is ~2.5x slower after node v16 (v17 and beyond) Additional informationNo response Activity
MetadataMetadataAssigneesLabelsbufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |