regexp vs indexOf (v160)

Revision 160 of this benchmark created by posinskadpilot on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
String.prototype.match
str.match(/world/);
ready
RegExp.prototype.test
str.indexOf("world");
ready
String.prototype.indexOf
~str.indexOf("world");
ready

Revisions

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