Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Chrome 143
Mac OS X 10.15.7
Desktop
3 months ago
Test name Executions per second
Intl.Collator.compare (ASCII-only strings) 496.4 Ops/sec
String.prototype.localeCompare (ASCII-only strings) 877.0 Ops/sec
Intl.Collator.compare 329.1 Ops/sec
String.prototype.localeCompare 273.8 Ops/sec
Script Preparation code:
Tests:
  • Intl.Collator.compare (ASCII-only strings)

  • String.prototype.localeCompare (ASCII-only strings)

  • Intl.Collator.compare

  • String.prototype.localeCompare