Script Preparation code:
Tests:

Historical Performance Data aggregated from 10 community runs

Desktop Results:
Chrome 10 runs
For Loop
4.6M/s
RegEx
3.2M/s

Fastest: For Loop (1.4x faster)

View exact numbers
  • For Loop: 4,625,820 ops/sec
  • RegEx: 3,238,961 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
    RegEx
    For Loop

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.4 Safari/605.1.15
Safari 18 on Mac OS X 10.15.7
View result in a separate tab
For Loop
524.6M/s
RegEx
493.3M/s
View exact numbers
Test name Executions per second
For Loop 524,563,872 Ops/sec
RegEx 493,255,808 Ops/sec