Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
Chrome 86
Windows
Desktop
3 years ago
Test name Executions per second
value == null 14827471.0 Ops/sec
value == undefined 5307021.0 Ops/sec
value === null 14880039.0 Ops/sec
value === undefined 5304102.0 Ops/sec
value === null || value === undefined 3889686.8 Ops/sec
_.isNil(value) 5272121.5 Ops/sec
value != null 14895512.0 Ops/sec
value != undefined 5278193.0 Ops/sec
value !== null 14878158.0 Ops/sec
value !== undefined 5351384.0 Ops/sec
value !== null && value !== undefined 3873460.5 Ops/sec
!_.isNil(value) 5256434.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)


;