News for hackers. Stuff that matters.
Re:JavaScript Array.push is 945x faster than Array.concat by scatters on Thursday May 23, 2019 @12:32PM (#19993219)
No, since the early array copies are on smaller arrays they take far less than O(n) time. The total time in copies is 1 + 2 + 4 + ... + 2^m + ... 2^(floor log2 n), which equals 2^(ceil log2 n) - 1, or O(n).

There are no comments on this comment yet.