Script Preparation code:
Tests:
  • a[i].startsWith(b[i]) when a[i] strictly equals b[i]

  • a[i].startsWith(b[j]) when a[i] different than b[j]

  • a[i] === b[i] when a[i] strictly equals b[i]

  • a[i] === b[j] when a[i] different than b[j]

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    a[i].startsWith(b[i]) when a[i] strictly equals b[i]
    a[i].startsWith(b[j]) when a[i] different than b[j]
    a[i] === b[i] when a[i] strictly equals b[i]
    a[i] === b[j] when a[i] different than b[j]

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: 10 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Firefox 95 on Windows
View result in a separate tab
Test name Executions per second
a[i].startsWith(b[i]) when a[i] strictly equals b[i] 29.0 Ops/sec
a[i].startsWith(b[j]) when a[i] different than b[j] 32.3 Ops/sec
a[i] === b[i] when a[i] strictly equals b[i] 162.3 Ops/sec
a[i] === b[j] when a[i] different than b[j] 40.6 Ops/sec