Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0
Chrome 124
Mac OS X 10.15.7
Desktop
3 months ago
Test name Executions per second
value == null 28994258.0 Ops/sec
value == undefined 11154590.0 Ops/sec
value === null 29026942.0 Ops/sec
value === undefined 11160939.0 Ops/sec
value === null || value === undefined 8462584.0 Ops/sec
_.isNil(value) 10798014.0 Ops/sec
value != null 29059952.0 Ops/sec
value != undefined 11172065.0 Ops/sec
value !== null 28800502.0 Ops/sec
value !== undefined 11219862.0 Ops/sec
value !== null && value !== undefined 8504895.0 Ops/sec
!_.isNil(value) 10842588.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)