Script Preparation code:
Tests:

Historical Performance Data aggregated from 8 community runs

Desktop Results:
Chrome 8 runs
a[i] === b[i] when a[i] strictly equals b[i]
394/s
a[i] === b[j] when a[i] different than b[j]
216/s
a[i].startsWith(b[j]) when a[i] different than b[j]
131/s
a[i].startsWith(b[i]) when a[i] strictly equals b[i]
12/s

Fastest: a[i] === b[i] when a[i] strictly equals b[i] (33.8x faster)

View exact numbers
  • a[i] === b[i] when a[i] strictly equals b[i]: 394 ops/sec
  • a[i] === b[j] when a[i] different than b[j]: 216 ops/sec
  • a[i].startsWith(b[j]) when a[i] different than b[j]: 131 ops/sec
  • a[i].startsWith(b[i]) when a[i] strictly equals b[i]: 12 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

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

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
Chrome 147 on Windows
View result in a separate tab
a[i] === b[i] when a[i] strictly equals b[i]
386/s
a[i] === b[j] when a[i] different than b[j]
215/s
a[i].startsWith(b[j]) when a[i] different than b[j]
123/s
a[i].startsWith(b[i]) when a[i] strictly equals b[i]
10/s
View exact numbers
Test name Executions per second
a[i] === b[i] when a[i] strictly equals b[i] 386 Ops/sec
a[i] === b[j] when a[i] different than b[j] 215 Ops/sec
a[i].startsWith(b[j]) when a[i] different than b[j] 123 Ops/sec
a[i].startsWith(b[i]) when a[i] strictly equals b[i] 10 Ops/sec