News for hackers. Stuff that matters.
Re:Memory in JavaScript – Beyond Leaks (2019) by deleuze on Monday June 22, 2020 @10:34AM (#23600624)
It's also how you end up with cargo cult optimizations for things that may have been solved ages ago in the VM. I've met Java devs who still insist on using StringBuilder for everything without empirical evidence.
Re:Memory in JavaScript – Beyond Leaks (2019) by darepublic on Monday June 22, 2020 @10:47AM (#23600799)
I was indoctrinated with that in school. What, it is not true anymore?
Re:Memory in JavaScript – Beyond Leaks (2019) by deleuze on Monday June 22, 2020 @10:55AM (#23600890)
Yes! Much has changed. Here's a good summary: https://stackoverflow.com/questions/46512888/how-is-string-c...

The change in question is JEP 280.

Re:Memory in JavaScript – Beyond Leaks (2019) by michielderhaeg on Monday June 22, 2020 @10:56AM (#23600901)
Don't quote me on this, but I think most String operations are compiled to StringBuilder operations automatically.