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 7973124.5 Ops/sec
value == undefined 2633611.8 Ops/sec
value === null 8001223.0 Ops/sec
value === undefined 2610420.2 Ops/sec
value === null || value === undefined 2027236.5 Ops/sec
_.isNil(value) 3131324.5 Ops/sec
value != null 8036351.0 Ops/sec
value != undefined 2612893.0 Ops/sec
value !== null 7957075.0 Ops/sec
value !== undefined 2561257.8 Ops/sec
value !== null && value !== undefined 1997775.5 Ops/sec
!_.isNil(value) 3182386.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)


;