Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Chrome 117
Linux
Desktop
one year ago
Test name Executions per second
Intl.Collator.compare (ASCII-only strings) 211.8 Ops/sec
String.prototype.localeCompare (ASCII-only strings) 394.8 Ops/sec
Intl.Collator.compare 116.8 Ops/sec
String.prototype.localeCompare 121.9 Ops/sec
Script Preparation code:
Tests:
  • Intl.Collator.compare (ASCII-only strings)

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

  • Intl.Collator.compare

  • String.prototype.localeCompare