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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Browser:
Chrome 136
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
push-spread
55.8M/s
Spread
36.1M/s
Splice
16.4M/s
Concat
10.4M/s
View exact numbers
Test name
Executions per second
✓
push-spread
55,824,276 Ops/sec
Spread
36,091,028 Ops/sec
Splice
16,371,600 Ops/sec
Concat
10,404,008 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);