Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125
Mac OS X 10.15.7
Desktop
7 months ago
Test name Executions per second
value == null 26310418.0 Ops/sec
value == undefined 9969934.0 Ops/sec
value === null 26527488.0 Ops/sec
value === undefined 9990680.0 Ops/sec
value === null || value === undefined 7528362.5 Ops/sec
_.isNil(value) 9712147.0 Ops/sec
value != null 26652930.0 Ops/sec
value != undefined 9805431.0 Ops/sec
value !== null 26130354.0 Ops/sec
value !== undefined 9986158.0 Ops/sec
value !== null && value !== undefined 7529994.5 Ops/sec
!_.isNil(value) 9685279.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)