Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
spread vs forEach push v3
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0
Browser:
Firefox 134
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
spread
186K/s
forEach push
175K/s
View exact numbers
Test name
Executions per second
✓
spread
186,305 Ops/sec
forEach push
175,375 Ops/sec
Script Preparation code:
var arr = Array.from(Array(1000).keys())
Tests:
spread
var brr = [...arr]
forEach push
var drr = [] var err = [] arr.forEach(item => { drr.push(item) })