Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36
Chrome 80
Windows
Desktop
4 years ago
Test name Executions per second
undefined w/ type 9385539.0 Ops/sec
undefined w/o type without type check 9395415.0 Ops/sec
typeof equal to 9330746.0 Ops/sec
typeof equal to without type check 9323431.0 Ops/sec
with brackets around typeof unequal 8779352.0 Ops/sec
with brackets around typeof equal 8930659.0 Ops/sec
with brackets around typeof unequal with type check 9377770.0 Ops/sec
with brackets around typeof equal with type check 9389161.0 Ops/sec
Script Preparation code:
Tests:
  • undefined w/ type

  • undefined w/o type without type check

  • typeof equal to

  • typeof equal to without type check

  • with brackets around typeof unequal

  • with brackets around typeof equal

  • with brackets around typeof unequal with type check

  • with brackets around typeof equal with type check