RegExp.test vs String.match

Benchmark created on


Preparation HTML

<script>
  var re = /oba/,
      str = "foobar";
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
RegExp.test
re.test(str);
ready
String.match
str.match(re);
ready

Revisions

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