String matching

Benchmark created on


Setup

let url = '//cdn.heapanalytics.com/js/heap-23232.23232-23232safsf'

Test runner

Ready to run.

Testing in
TestOps/sec
startsWith
url.startsWith('//cdn.heapanalytics.com/js/heap-')
ready
substring
url.substring(0,31) === '//cdn.heapanalytics.com/js/heap-'
ready

Revisions

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