HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 6 community runs

Desktop Results:
Chrome 6 runs
for ... of
8K/s
.reduce()
3K/s
regular for
2K/s
.filter().map()
1K/s
.flatMap()
1K/s
regular for, prefilled then trimmed
579/s

Fastest: for ... of (13.7x faster)

View exact numbers
  • for ... of: 7,950 ops/sec
  • .reduce(): 2,653 ops/sec
  • regular for: 2,495 ops/sec
  • .filter().map(): 1,323 ops/sec
  • .flatMap(): 1,171 ops/sec
  • regular for, prefilled then trimmed: 579 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
    .filter().map()
    .flatMap()
    .reduce()
    for ... of
    regular for
    regular for, prefilled then trimmed

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 months ago)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36
Chrome Mobile 146 on Android
View result in a separate tab
for ... of
5K/s
regular for
1K/s
.reduce()
1K/s
.filter().map()
668/s
.flatMap()
586/s
regular for, prefilled then trimmed
255/s
View exact numbers
Test name Executions per second
for ... of 4,897 Ops/sec
regular for 1,268 Ops/sec
.reduce() 1,165 Ops/sec
.filter().map() 668 Ops/sec
.flatMap() 586 Ops/sec
regular for, prefilled then trimmed 255 Ops/sec