News for hackers. Stuff that matters.
Re:JavaScript Array.push is 945x faster than Array.concat by Scarbutt on Thursday May 23, 2019 @02:13PM (#19994337)
However, within a function, avoiding mutation seems pointless as you should have no trouble reasoning about it. At some point you really are just throwing away performance with significantly diminishing benefits

Ok, but here you are doing all the manual work of creating a copy as to avoid mutating the arg/returning a new one and, it may be less peformant because of whole copy, knowing your programming language automtically defaults and does this for you in a performant way is a big win for reducing cognitive overhead in large programs.

There are no comments on this comment yet.