regexp vs indexOf (v103)

Revision 103 of this benchmark created by Roberto on


Preparation HTML

<script>
  var str = "hello world!";
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Regexp
str.match(/world/);
ready
indexOf
str.indexOf("world");
ready
wrong match
str.match('world');
ready

Revisions

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