test regex vs includes

Benchmark created on


Setup

var str = new Array(10000).join("abcdefghij");
var re = /[?#]/;

Test runner

Ready to run.

Testing in
TestOps/sec
regex
re.test(str)
ready
includes
str.includes("?") || str.includes("#")

ready

Revisions

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