Test simple indexOf vs match (v2)

Revision 2 of this benchmark created by Tom on


Test runner

Ready to run.

Testing in
TestOps/sec
Regex
var regex = new RegExp('Appendiciti', 'i')
var row = "acute (catarrhal) (fulminating) (gangrenous) Appendiciti (obstructive) (retroacutececal) (suppurative)"

if (regex.test(row)) {
}
 
ready
IndexOf
var row = "acute (catarrhal) (fulminating) (gangrenous) Appendiciti (obstructive) (retroacutececal) (suppurative)"

if (row.toLowerCase().indexOf('Appendiciti'.toLowerCase())) {
}
 
ready

Revisions

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