3 ms·
Strings are immutable, so each one of these concatenations creates a new string with slightly more content. I have seen modern JavaScript that can be just as b
by 29athrowaway 6y ago
Strings are immutable, so each one of these concatenations creates a new string with slightly more content.
I have seen modern JavaScript that can be just as bad as this.
- minitech 6y agoNot really correct for JavaScript (among others). All modern implementations optimize repeated appends in cases like this. They all have ropes, too.
- pwdisswordfish0 6y agoMost modern JavaScript I've seen is worse than this. At least it's not a minified blob built up from dozens of repos whose primary purpose is to make its authors look (feel) productive/prolific.