Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15
Safari 15
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
value == null 25789698.0 Ops/sec
value == undefined 9379204.0 Ops/sec
value === null 25156576.0 Ops/sec
value === undefined 9386498.0 Ops/sec
value === null || value === undefined 7157184.0 Ops/sec
_.isNil(value) 10517614.0 Ops/sec
value != null 25503920.0 Ops/sec
value != undefined 9410797.0 Ops/sec
value !== null 25476768.0 Ops/sec
value !== undefined 9367338.0 Ops/sec
value !== null && value !== undefined 7123110.5 Ops/sec
!_.isNil(value) 10483921.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)


;