test vs indexof test (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script>
var str = "This is just a random String";
var exp = /just/ig;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
test
/just/ig.test(str);
ready
indexOf
str.indexOf('just') > -1;
ready
bittwiddle indexOf
~str.indexOf('just');
ready
regExp var test
exp.test(str);
ready

Revisions

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