Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Chrome 104
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
value == null 27047220.0 Ops/sec
value == undefined 9694828.0 Ops/sec
value === null 27026364.0 Ops/sec
value === undefined 9704355.0 Ops/sec
value === null || value === undefined 7170683.5 Ops/sec
_.isNil(value) 9360442.0 Ops/sec
value != null 27051090.0 Ops/sec
value != undefined 9680327.0 Ops/sec
value !== null 27002854.0 Ops/sec
value !== undefined 9713650.0 Ops/sec
value !== null && value !== undefined 7174736.0 Ops/sec
!_.isNil(value) 9339756.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)