Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
spread array performance (vs slice, splice, concat)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0
Browser:
Firefox 142
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Slice
21.4M/s
Concat
15.2M/s
Spread
10.4M/s
Splice
9.7M/s
View exact numbers
Test name
Executions per second
✓
Slice
21,371,486 Ops/sec
Concat
15,229,777 Ops/sec
Spread
10,443,658 Ops/sec
Splice
9,741,041 Ops/sec
Tests:
Splice
const testArray = [1, 2, 3]; const newTestArray = testArray.splice(0);
Slice
const testArray = [1, 2, 3]; const newTestArray = testArray.slice();
Concat
const testArray = [1, 2, 3]; const newTestArray = testArray.concat();
Spread
const testArray = [1, 2, 3]; const newTestArray = [...testArray];