Large array adding items

Benchmark publishedon

Setup

const a = [];
const b = [];
for(let i = 0;i<10_000; i++){
	a.push(i);
	b.push(i*2);
}

Test Runner

Initializing...

Testing in
Test CaseOps/sec
Spread
const c = [...a, ...b];
ready
Concat
const c = a.concat(b);
ready

Revisions

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

Revision 1
publishedon