indexOf And Tilde (v4)

Revision 4 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
indexOf
if ('shoe horn'.indexOf('shoe') >= 0) {
  //found it
} else {
  //didn't
}
ready
tilde
if (~'shoe horn'.indexOf('shoe')) {
  //didn't find it
} else {
  //did
}
ready

Revisions

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