regexp vs indexOf (v102)

Revision 102 of this benchmark created on


Preparation HTML

<script>
  var str = "filename.scp";
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Regexp
str.match(/\.tzr|\.tze|\.scp/gi);
ready
indexOf
str.indexOf(".tzr" || ".tze" || ".TZR" || ".TZE" || ".SCP" || ".scp");
ready

Revisions

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