indexof vs match

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
indexof
(navigator.userAgent.toLowerCase()).indexOf("win") != -1
ready
match
navigator.userAgent.match(/win/i);
ready

Revisions

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