Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Whale/3.5.3.2 Safari/537.36
Chrome 120
Linux
Desktop
2 months ago
Test name Executions per second
value == null 11112008.0 Ops/sec
value == undefined 3857041.2 Ops/sec
value === null 10524787.0 Ops/sec
value === undefined 3919226.5 Ops/sec
value === null || value === undefined 2916833.2 Ops/sec
_.isNil(value) 3719069.8 Ops/sec
value != null 10522448.0 Ops/sec
value != undefined 3863763.2 Ops/sec
value !== null 10318177.0 Ops/sec
value !== undefined 3830044.0 Ops/sec
value !== null && value !== undefined 2954293.5 Ops/sec
!_.isNil(value) 3682011.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)


;