Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
array concat performance test (splice, concat, spread, push with spread)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Browser:
Chrome 125
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
push-spread
66.4M/s
Spread
43.2M/s
Splice
20.6M/s
Concat
15.9M/s
View exact numbers
Test name
Executions per second
✓
push-spread
66,404,904 Ops/sec
Spread
43,235,252 Ops/sec
Splice
20,615,900 Ops/sec
Concat
15,860,570 Ops/sec
Tests:
Splice
const testArray1 = [1, 2, 3]; const testArray2 = [4, 5, 6]; const newTestArray = testArray1.splice(testArray1.length, 0, ...testArray2);
Concat
const testArray = [1, 2, 3]; const testArray2 = [4, 5, 6]; const newTestArray = testArray.concat(testArray2);
Spread
const testArray = [1, 2, 3]; const testArray2 = [4, 5, 6]; const newTestArray = [...testArray, ...testArray2];
push-spread
const testArray = [1, 2, 3]; const testArray2 = [4, 5, 6]; const newTestArray = testArray.push(...testArray2);