a millisecond here, a millisecond there... and you end up with a clunky choppy app. I'm against premature optimization, but it helps to know where the bottlenecks are.
I work on a Web app that has 15 years of technical debt, over one hundred of devs have touched it, we've had our fair share of performance issues. Improper caching, no caching, over caching, bad 3rd party libraries, bad db queries, bad configuration, nested loops, synchronous tasks that should be async, those are the usual suspects, string concatenation has never come close to a bottle neck.
4
u/[deleted] Mar 27 '15
hmmm... Array.join("") vs str += "some crap"
Ran some tests - string building is nearly twice faster than array.join()... Go figure.