test-vs-indexof-url4

Benchmark created by spoutnik on


Description

test vs indexof

Test runner

Ready to run.

Testing in
TestOps/sec
test():
/http\:\/\/www\.example\.com\//.test('http://www.example.com/folder1/anotherfolder/index.php') == true;
ready
indexof
'http://www.example.com/folder1/anotherfolder/index.php'.indexOf('http://www.example.com/') > -1;
ready
match
'http://www.example.com/folder1/anotherfolder/index.php'.match(/http\:\/\/www\.example\.com\//);
ready

Revisions

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

  • Revision 1: published by spoutnik on