For vs indexOf

Benchmark created by Stanislav Hacker on


Setup

var accentsOut = "ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËĚěèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž";

Test runner

Ready to run.

Testing in
TestOps/sec
indexOf
accentsOut.indexOf("ě");
ready
for
for (var i = 0; i < accentsOut.length; i++) {
    if (accentsOut[i] === "ě") {
         return i;
    }
}
ready

Revisions

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

  • Revision 1: published by Stanislav Hacker on