Concat v. Spread

Benchmark created on


Setup

const arr1 = Array.apply({ key: 'value' }, new Array(100))
const arr2 = Array.apply({ key: 'value' }, new Array(100))

Test runner

Ready to run.

Testing in
TestOps/sec
Concat
const newArr = arr1.concat(arr2)
ready
Spread
const newArr = [
  ...arr1,
  ...arr2
]
ready

Revisions

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