Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Number.isNaN + parseInt 3269500.5 Ops/sec
String includes 774007040.0 Ops/sec
Number.isNaN + casting 6537967.5 Ops/sec
Equality + casting 775382912.0 Ops/sec
Regex 30836108.0 Ops/sec
Tests:
  • Number.isNaN + parseInt

  • String includes

  • Number.isNaN + casting

  • Equality + casting

  • Regex