regexp vs indexOf (v118)

Revision 118 of this benchmark created by V on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
indexOf -1
str.indexOf("world") != -1;
ready
indexOf >
str.indexOf("world") >= 0;
ready

Revisions

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