Fastest way to merge two arrays (v2)

Revision 2 of this benchmark created on


Setup

let original = ['hello', 1, 2, 3, { randomThing: 'buh' }];

const args = [{ one: 'thing1', two: 'thing2' }];

Test runner

Ready to run.

Testing in
TestOps/sec
Concat
original = original.concat(args);
ready
Spread
const newArr = [...original, ...args];
ready
Push
original.push.apply(original, args);
ready

Revisions

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