Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
for vs for of vs for in
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0
Browser:
Firefox 138
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
for
17K/s
for of
8K/s
for in
455/s
View exact numbers
Test name
Executions per second
✓
for
16,572 Ops/sec
for of
8,303 Ops/sec
for in
455 Ops/sec
Tests:
for
const arr = Array(10000).fill(0); const l = arr.length; for (let i = 0; i < l; i++) { arr[i]; }
for of
const arr = Array(10000).fill(0); for (let x of arr) { x; }
for in
const arr = Array(10000).fill(0); for (let i in arr) { arr[i]; }