test-vs-indexof-url3 (v2)

Revision 2 of this benchmark created by spoutnik on


Description

compares test and indexOf on a primitive string

Setup

var str = 'http://www.example.com/folder1/anotherfolder/index.php';
    var needle = 'http://www.example.com/';

Test runner

Ready to run.

Testing in
TestOps/sec
test():
str.test(needle);
ready
indexOf():
str.indexOf(needle);
ready

Revisions

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

  • Revision 2: published by spoutnik on