Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
foooorr
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Browser:
Chrome 132
Operating system:
Chrome OS 14541.0.0
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
for backwards
42.6 Ops/sec
for in
41.6 Ops/sec
for of
46.2 Ops/sec
for
33.3 Ops/sec
forEach
37.9 Ops/sec
manual iterator
30660098.0 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
let array = Array.from({length:1000},(i,ii)=>ii) let iterator = array.values() function forEach(o) {console.log(o ** 2)}
Tests:
for backwards
for (let {length} = array; length--;) console.log(array[length] ** 2)
for in
for (let i in array) console.log(array[i] ** 2)
for of
for (let o of array) console.log(o ** 2)
for
for (let i = 0, {length} = array; i < length; i++) console.log(array[i] ** 22)
forEach
array.forEach(forEach)
manual iterator
let {done, value} = iterator.next() while(!done) { ({done,value} = iterator.next()) console.log(value ** 2) }