localeCompare (v16)

Revision 16 of this benchmark created on


Setup

var s1 = "first";
    var s2 = "second";
    var collator = new Intl.Collator("lt-LT");

Test runner

Ready to run.

Testing in
TestOps/sec
localeCompare
s1.localeCompare(s2, "lt-LT")
ready
Custom
s1 < s1 ? -1 : s1 > s2 ? 1 : 0;
ready
Intl.Collator.compare
collator.compare(s1, s2)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.