Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
numeric en: Intl.Collator('en', {numeric: true}).compare() vs localeCompare('en', {numeric: true})
(version: 1)
Comparing performance of:
localeCompare() vs Intl.Collator('en', {numeric: true}).compare()
Created:
2 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var a = "FOO BAR"; var b = "foo bar"; var options = { numeric: true }; var collator = new Intl.Collator('en', options);
Tests:
localeCompare()
a.localeCompare(b, 'en', options) === 0
Intl.Collator('en', {numeric: true}).compare()
collator.compare(a, b) === 0
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
localeCompare()
Intl.Collator('en', {numeric: true}).compare()
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?