Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
[LC] template
(version: 0)
Comparing performance of:
for vs for-each
Created:
2 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var inputArray = Array.from(Array(10000).keys());
Tests:
for
const length = inputArray.length; for (let i = 0; i < length; ++i) { }
for-each
let i = 0; for (const element of inputArray) { ++i; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
for
for-each
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?