Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
Chrome 89
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
value == null 7068857.5 Ops/sec
value == undefined 3184119.2 Ops/sec
value === null 7092112.5 Ops/sec
value === undefined 3230753.2 Ops/sec
value === null || value === undefined 2363354.2 Ops/sec
_.isNil(value) 3164565.2 Ops/sec
value != null 7038519.5 Ops/sec
value != undefined 3208240.2 Ops/sec
value !== null 7093497.5 Ops/sec
value !== undefined 3245510.2 Ops/sec
value !== null && value !== undefined 2508576.8 Ops/sec
!_.isNil(value) 3199402.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)


;