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; rv:146.0) Gecko/20100101 Firefox/146.0
Browser:
Firefox 146
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
3 months ago
Test name
Executions per second
for loop
2544968.8 Ops/sec
create array to iterate with for..of
226738.7 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(); }