Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_5_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36
Chrome 88
Mac OS X 11.5.0
Desktop
3 years ago
Test name Executions per second
value == null 24654168.0 Ops/sec
value == undefined 8408799.0 Ops/sec
value === null 24139648.0 Ops/sec
value === undefined 8445829.0 Ops/sec
value === null || value === undefined 5682024.0 Ops/sec
_.isNil(value) 8409411.0 Ops/sec
value != null 24557758.0 Ops/sec
value != undefined 8373522.5 Ops/sec
value !== null 24427246.0 Ops/sec
value !== undefined 8402725.0 Ops/sec
value !== null && value !== undefined 5659853.5 Ops/sec
!_.isNil(value) 8363312.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)