Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
for vs for of
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/127.0.6533.107 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 127
Operating system:
iOS 17.6
Device Platform:
Mobile
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
for of
1K/s
for
44/s
View exact numbers
Test name
Executions per second
✓
for of
1,089 Ops/sec
for
44 Ops/sec
Script Preparation code:
var count = 1000 * 1000 var data = []; do { data.push(count); } while(--count);
Tests:
for
var length = data.length; for (var index = 0; index < length; index++) { var obj = data[index]; obj == obj; }
for of
for (var obj of data) { obj == obj; }