Skip to content

Comment on Speedup from switch to +=parent

Comments

Alternatively, keep the first line as is. That gives you a copy that’s only known to the function, so you can change the later ones.

I would only do that if I had seen it to be faster, though, and add a comment on why the first line couldn’t do +=.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.