startsWith stub indexOf vs regex

Benchmark created by gghez on


Description

Regular expression may be more efficient than primitive call on basic purposes.

Test runner

Ready to run.

Testing in
TestOps/sec
.indexOf
!'R:EUR='.indexOf('R:');
ready
//.test
/^R:/.test('R:EUR=');
ready

Revisions

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