localeCompare (v4)

Revision 4 of this benchmark created on


Setup

var s1 = "first";
    var s2 = "second";

Test runner

Ready to run.

Testing in
TestOps/sec
localeCompare
s1.localeCompare(s2, "en", {
  sensitivity: "base"
})
ready
Custom
var us1 = s1.toLowerCase();
var us2 = s2.toLowerCase();
us1 < us1 ? -1 : us1 > us2 ? 1 : 0;
ready

Revisions

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