Script Preparation code:
Tests:

Historical Performance Data aggregated from 78 community runs

Desktop Results:
Chrome 59 runs
JS includes
6K/s
JS startsWith
5K/s
JS substring
3K/s

Fastest: JS includes (2.0x faster)

View exact numbers
  • JS includes: 5,989 ops/sec
  • JS startsWith: 4,986 ops/sec
  • JS substring: 3,000 ops/sec
Firefox 14 runs
JS startsWith
4K/s
JS includes
4K/s
JS substring
2K/s

Fastest: JS startsWith (2.1x faster)

View exact numbers
  • JS startsWith: 3,528 ops/sec
  • JS includes: 3,514 ops/sec
  • JS substring: 1,657 ops/sec
Safari 5 runs
JS startsWith
17K/s
JS substring
12K/s
JS includes
10K/s

Fastest: JS startsWith (1.8x faster)

View exact numbers
  • JS startsWith: 17,490 ops/sec
  • JS substring: 11,550 ops/sec
  • JS includes: 9,602 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
    JS startsWith
    JS includes
    JS substring

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Chrome 149 on Windows
View result in a separate tab
JS substring
58K/s
JS includes
54K/s
JS startsWith
27K/s
View exact numbers
Test name Executions per second
JS substring 58,333 Ops/sec
JS includes 54,169 Ops/sec
JS startsWith 26,844 Ops/sec