String concat

Benchmark created on


Setup

const iterations = 100000

Test runner

Ready to run.

Testing in
TestOps/sec
String append
let str = ''
for (let i = 0; i <= iterations; i++) {
	str += 'a'
}
ready
Array push/join
let acc = []
for (let i = 0; i <= iterations; i++) {
	acc.push('a')
}
acc.join('')
ready
String concat
let str = ''
for (let i = 0; i <= iterations; i++) {
	str = str.concat('a')
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.