building a string from array

Benchmark created on


Setup

const arr = Array.from({length: 1000000}, (idx)=>idx)

Test runner

Ready to run.

Testing in
TestOps/sec
.join().replaceAll()
arr.join().replaceAll()
ready
.join("")
arr.join("")
ready
.reduce(...)
arr.reduce((acc, val) => acc + val, '')
ready

Revisions

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