Tests:

Historical Performance Data aggregated from 92 community runs

Desktop Results:
Chrome 74 runs
endsWith
94.0M/s
Regex
8.6M/s

Fastest: endsWith (11.0x faster)

View exact numbers
  • endsWith: 93,976,336 ops/sec
  • Regex: 8,581,422 ops/sec
Firefox 13 runs
endsWith
1558.3M/s
Regex
14.6M/s

Fastest: endsWith (106.6x faster)

View exact numbers
  • endsWith: 1,558,309,376 ops/sec
  • Regex: 14,622,450 ops/sec
Safari 5 runs
endsWith
74.7M/s
Regex
19.4M/s

Fastest: endsWith (3.9x faster)

View exact numbers
  • endsWith: 74,656,512 ops/sec
  • Regex: 19,381,944 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
    endsWith

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137 on Windows
View result in a separate tab
endsWith
90.4M/s
Regex
5.3M/s
View exact numbers
Test name Executions per second
endsWith 90,444,824 Ops/sec
Regex 5,265,262 Ops/sec