Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15
Safari 14
Mac OS X 10.15.6
Desktop
3 years ago
Test name Executions per second
value == null 6813573.0 Ops/sec
value == undefined 2295853.2 Ops/sec
value === null 6884720.5 Ops/sec
value === undefined 2197169.0 Ops/sec
value === null || value === undefined 1802399.6 Ops/sec
_.isNil(value) 2764560.0 Ops/sec
value != null 6981541.5 Ops/sec
value != undefined 2328121.8 Ops/sec
value !== null 7067745.5 Ops/sec
value !== undefined 2350226.8 Ops/sec
value !== null && value !== undefined 1804368.4 Ops/sec
!_.isNil(value) 2745122.2 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)