Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
spread vs concat vs unshift
spread vs concat vs unshift
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0
Browser:
Firefox 140
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
arrayUnshift123
595K/s
arrayConcat123
62/s
arraySpread123
14/s
View exact numbers
Test name
Executions per second
✓
arrayUnshift123
594,559 Ops/sec
arrayConcat123
62 Ops/sec
arraySpread123
14 Ops/sec
Script Preparation code:
var array = [1,2,3];
Tests:
arrayUnshift123
array.unshift(0);
arrayConcat123
array = array.concat([0])
arraySpread123
array = [0, ...array]