match vs others

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
match
'C0001'.match(/^C/);
'Q0001'.match(/^C/);
ready
charAt
'C0001'.charAt(0);
'Q0001'.charAt(0);
ready
prop
'C0001'[0]
'Q0001'[0]
ready
substr
'C0001'.substr(0,1)
'Q0001'.substr(0,1)
ready
substring
'C0001'.substring(0,1)
'Q0001'.substring(0,1)
ready
slice
'C0001'.slice(0,1)
'Q0001'.slice(0,1)
ready
indexOf
'C0001'.indexOf('C')
'Q0001'.indexOf('C')
ready

Revisions

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