Version
v18.12.1
Platform
Linux 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
Subsystem
Buffer
What steps will reproduce the bug?
Run this under node v18 vs node v16
constrandomBuffer=(length)=>Buffer.from(Array.from({length},()=>Math.random()*255))consttestCases=[{bytesPerBuffer: 32,numBuffers: 10},]for(const{bytesPerBuffer, numBuffers}oftestCases){constresults=[]for(leti=0;i<100_000;i++){constbuffers=Array.from({length: numBuffers},()=>randomBuffer(bytesPerBuffer))constbefore=performance.now()Buffer.concat(buffers)constafter=performance.now()results.push(after-before)}constavgTime=results.reduce((a,b)=>a+b,0)/results.lengthconsole.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 information
No response
Version
v18.12.1
Platform
Linux 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
Subsystem
Buffer
What steps will reproduce the bug?
Run this under node v18 vs node v16
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 information
No response