Run details:
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
Windows
Desktop
2 months ago
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
Script Preparation code:
Tests: