Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 OPR/96.0.0.0 (Edition Yx 05)
Opera 96
Windows
Desktop
2 years ago
Test name Executions per second
includes 4538398.0 Ops/sec
!~indexOf 4549541.0 Ops/sec
indexOf > -1 4536051.0 Ops/sec
indexOf !== -1 4567980.0 Ops/sec
test 3452272.8 Ops/sec
match 3192071.2 Ops/sec
Script Preparation code:
Tests:
  • includes

  • !~indexOf

  • indexOf > -1

  • indexOf !== -1

  • test

  • match