Array Spread vs Concat (v3)

Revision 3 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Spread
const a = [1,2,3]
const b = [4,5,6]

const c = {
	a: a
}

c["a"].push(...b)
ready
Concat
let a = [1,2,3]
let b = [4,5,6]

const c = {
	a: a
}

c["a"] = a.concat(b)
ready

Revisions

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