Script Preparation code:
Tests:

Historical Performance Data aggregated from 7 community runs

Desktop Results:
Chrome 7 runs
Intl.Collator.compare()
3.5M/s
localeCompare()
195K/s

Fastest: Intl.Collator.compare() (17.8x faster)

View exact numbers
  • Intl.Collator.compare(): 3,472,982 ops/sec
  • localeCompare(): 194,871 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
    localeCompare()
    Intl.Collator.compare()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Chrome 149 on Mac OS X 10.15.7
View result in a separate tab
Intl.Collator.compare()
22.1M/s
localeCompare()
1.1M/s
View exact numbers
Test name Executions per second
Intl.Collator.compare() 22,051,220 Ops/sec
localeCompare() 1,053,553 Ops/sec