HTML Preparation code:
Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
for
175.6M/s
array foreach
92.4M/s
array lodash foreach
84.2M/s
lodash range lodash foreach
66.1M/s
lodash range foreach
64.0M/s

Fastest: for (2.7x faster)

View exact numbers
  • for: 175,606,832 ops/sec
  • array foreach: 92,410,544 ops/sec
  • array lodash foreach: 84,183,016 ops/sec
  • lodash range lodash foreach: 66,085,444 ops/sec
  • lodash range foreach: 63,976,656 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    for
    lodash range foreach
    array foreach
    array lodash foreach
    lodash range lodash foreach

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 months ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36
Chrome 91 on Linux
View result in a separate tab
for
71.8M/s
array foreach
40.1M/s
array lodash foreach
40.0M/s
lodash range foreach
33.6M/s
lodash range lodash foreach
29.7M/s
View exact numbers
Test name Executions per second
for 71,776,440 Ops/sec
array foreach 40,088,680 Ops/sec
array lodash foreach 39,958,884 Ops/sec
lodash range foreach 33,604,864 Ops/sec
lodash range lodash foreach 29,736,104 Ops/sec