Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array shift/spread test
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/126.0.0.0 Safari/537.36
Browser:
Chrome 126
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
unsift array
69.6 Ops/sec
spread array
1.7 Ops/sec
Tests:
unsift array
let arr = Array.from(Array(10000).keys()) for(i=0; i<10000; i++){ arr.unshift(i); } console.log(arr);
spread array
let arr = Array.from(Array(10000).keys()) for(i=0; i<10000; i++){ arr = [i, ...arr]; } console.log(arr);