String Concatenation vs Array Join: I Timed the Old Advice
I timed string += against array push then join at four loop sizes in Node 22 At 1 million iterations, += finished in 339ms against 437ms for push and join The two methods tied at 10,000 and 100,000 iterations, within a few percent either way The old advice to always use array join for loops no long…
Read the full story at DEV Community — AI ↗
Timeline · 1 report
- 2026-11-06 22:15 · DEV Community — AI
String Concatenation vs Array Join: I Timed the Old Advice