Script Preparation code:
Tests:

Historical Performance Data aggregated from 51 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 9 runs
Intl.Collator
139/s
localeCompare
139/s
View exact numbers
  • Intl.Collator: 139 ops/sec
  • localeCompare: 139 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: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:154.0) Gecko/20100101 Firefox/154.0
Firefox 154 on Mac OS X 10.15
View result in a separate tab
localeCompare
583/s
Intl.Collator
554/s
View exact numbers
Test name Executions per second
localeCompare 583 Ops/sec
Intl.Collator 554 Ops/sec