Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Chrome 95
Linux
Desktop
3 years ago
Test name Executions per second
value == null 14491697.0 Ops/sec
value == undefined 4798944.0 Ops/sec
value === null 14039718.0 Ops/sec
value === undefined 4939764.0 Ops/sec
value === null || value === undefined 3687055.2 Ops/sec
_.isNil(value) 4853002.5 Ops/sec
value != null 14356261.0 Ops/sec
value != undefined 4854081.5 Ops/sec
value !== null 14030000.0 Ops/sec
value !== undefined 4808595.0 Ops/sec
value !== null && value !== undefined 3491760.5 Ops/sec
!_.isNil(value) 4759286.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • value == null

  • value == undefined

  • value === null

  • value === undefined

  • value === null || value === undefined

  • _.isNil(value)

  • value != null

  • value != undefined

  • value !== null

  • value !== undefined

  • value !== null && value !== undefined

  • !_.isNil(value)