Regexp .test vs Regexp .match indexOf (v99)

Revision 99 of this benchmark created by c24w on


Preparation HTML

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

Test runner

Ready to run.

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

Revisions

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