Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0
Firefox 73
Windows
Desktop
4 years ago
Test name Executions per second
undefined w/ type 254243700.0 Ops/sec
undefined w/o type without type check 254544400.0 Ops/sec
typeof equal to 254502600.0 Ops/sec
typeof equal to without type check 254184800.0 Ops/sec
with brackets around typeof unequal 254263300.0 Ops/sec
with brackets around typeof equal 253746000.0 Ops/sec
with brackets around typeof unequal with type check 253973300.0 Ops/sec
with brackets around typeof equal with type check 254067500.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