Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132
Windows
Desktop
one year ago
for in
63.8M/s
for (with defined iterator and iterator limit)
1.3M/s
while (with defined iterator limit)
1.3M/s
while
1.3M/s
for
1.3M/s
do while
1.1M/s
do while (with defined iterator limit)
1.1M/s
for (with defined iterator)
975K/s
forEach
964K/s
for of
140K/s
View exact numbers
Test name Executions per second
for in 63,762,584 Ops/sec
for (with defined iterator and iterator limit) 1,305,879 Ops/sec
while (with defined iterator limit) 1,302,924 Ops/sec
while 1,301,795 Ops/sec
for 1,277,126 Ops/sec
do while 1,131,534 Ops/sec
do while (with defined iterator limit) 1,111,609 Ops/sec
for (with defined iterator) 974,951 Ops/sec
forEach 964,478 Ops/sec
for of 139,566 Ops/sec
Script Preparation code:
Tests: