Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Windows
Desktop
4 months ago
Test name Executions per second
for 19339656.0 Ops/sec
for of 22831210.0 Ops/sec
for in 816927.6 Ops/sec
forEach 25731544.0 Ops/sec
for 2 25599286.0 Ops/sec
while with shift 2010041.9 Ops/sec
while 27336246.0 Ops/sec
while with length reduction 20193752.0 Ops/sec
for reverse 23216702.0 Ops/sec
Tests:
  • for

  • for of

  • for in

  • forEach

  • for 2

  • while with shift

  • while

  • while with length reduction

  • for reverse