Javascript Does Not Need a StringBuilder

Javascript Does Not Need a StringBuilder.
Today I learned that Javascript does not need a StringBuilder for accumulating a large number of concatinations. As a Java programmer, that came as a shock to me. This article summarizes my exploration of this fact. Effective Java A StringBuilder is grilled into Java programmers. Effective Java [1] says, “Item…

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

4 Likes

Corresponding tweet for this thread:

Share link for this tweet.

2 Likes

StringBuilder is a great example of premature optimization.

2 Likes

Depends. If it’s the extreme case shown in that article, I’d say it’s worthwhile to use it, because the concatenation example literally didn’t finish for many of the runs.

2 Likes