Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Chrome 104
Linux
Desktop
2 years ago
Test name Executions per second
value == null 11318938.0 Ops/sec
value == undefined 3712109.2 Ops/sec
value === null 11221151.0 Ops/sec
value === undefined 3577324.2 Ops/sec
value === null || value === undefined 2849311.8 Ops/sec
_.isNil(value) 3542560.2 Ops/sec
value != null 10491263.0 Ops/sec
value != undefined 3789579.2 Ops/sec
value !== null 11587032.0 Ops/sec
value !== undefined 3931294.5 Ops/sec
value !== null && value !== undefined 2984868.0 Ops/sec
!_.isNil(value) 3819929.2 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)


;