Script Preparation code:
Tests:

Historical Performance Data aggregated from 50 community runs

Desktop Results:
Chrome 42 runs
localeCompare
710/s
Intl.Collator
301/s

Fastest: localeCompare (2.4x faster)

View exact numbers
  • localeCompare: 710 ops/sec
  • Intl.Collator: 301 ops/sec
Firefox 8 runs
Intl.Collator
131/s
localeCompare
126/s
View exact numbers
  • Intl.Collator: 131 ops/sec
  • localeCompare: 126 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
    Intl.Collator
    localeCompare

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 15 days ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5.2 Safari/605.1.15
Safari 26 on Mac OS X 10.15.7
View result in a separate tab
localeCompare
1K/s
Intl.Collator
700/s
View exact numbers
Test name Executions per second
localeCompare 1,064 Ops/sec
Intl.Collator 700 Ops/sec