Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Iterate X times
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Browser:
Chrome 143
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
6 months ago
create array to iterate with for..of
824K/s
for loop
471K/s
View exact numbers
Test name
Executions per second
✓
create array to iterate with for..of
823,633 Ops/sec
for loop
470,762 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const amountOfIterations = 1000; const doSomethingThatDoesNotNeedAccessToTheItem = () => { 1+1; }
Tests:
for loop
for(let i = 0; i < amountOfIterations; ++i) { doSomethingThatDoesNotNeedAccessToTheItem(); }
create array to iterate with for..of
const arrayToIterateOver = new Array(amountOfIterations); for (const _item of arrayToIterateOver) { doSomethingThatDoesNotNeedAccessToTheItem(); }