Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
Chrome 86
Mac OS X 10.15.3
Desktop
4 years ago
Test name Executions per second
value == null 16966852.0 Ops/sec
value == undefined 5199542.0 Ops/sec
value === null 16286073.0 Ops/sec
value === undefined 5426684.5 Ops/sec
value === null || value === undefined 4143923.5 Ops/sec
_.isNil(value) 5401149.0 Ops/sec
value != null 16933988.0 Ops/sec
value != undefined 5478503.5 Ops/sec
value !== null 16987466.0 Ops/sec
value !== undefined 5521380.0 Ops/sec
value !== null && value !== undefined 4143685.8 Ops/sec
!_.isNil(value) 5170045.5 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)


;