DEV Community

Discussion on: Please don't "overchain" array methods

 
okdewit profile image
Orian de Wit • Edited

You are right that it doesn't take three times as long, my mistake.

But it's never just "1+1+1=3" either.

Especially if the arrays are large, and the operations are simple, then the overhead of copying the array doesn't just affect memory use, it also takes longer.