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 11046720.0 Ops/sec
value == undefined 3695261.5 Ops/sec
value === null 10745810.0 Ops/sec
value === undefined 3807877.2 Ops/sec
value === null || value === undefined 2827586.0 Ops/sec
_.isNil(value) 3762835.2 Ops/sec
value != null 11073610.0 Ops/sec
value != undefined 3789631.5 Ops/sec
value !== null 11098219.0 Ops/sec
value !== undefined 3809417.0 Ops/sec
value !== null && value !== undefined 2826916.0 Ops/sec
!_.isNil(value) 3766438.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)


;