News for hackers. Stuff that matters.
Re:JavaScript Array.push is 945x faster than Array.concat by sundbry on Thursday May 23, 2019 @12:51PM (#19993428)
An efficient immutable vector can be concatenated much faster without any reallocation of either array; one would probably outperform .push for bigger arrays in this case.
Re:JavaScript Array.push is 945x faster than Array.concat by BubRoss on Thursday May 23, 2019 @03:07PM (#19994876)
How is that true? push shouldn't be reallocating the array on each call. You seem to be alluding to a linked list of arrays.