Test name | Executions per second |
---|---|
Concat | 256.4 Ops/sec |
Join | 1922.6 Ops/sec |
var strs = Array.from(new Array(10000)).map(() => 'String concat. ')
var result = ''
for (let i = 0; i < strs.length; i++) {
result += strs[i]
}
result = strs.map((a) => a).join('')