Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36
Chrome 92
Linux
Desktop
3 years ago
Test name Executions per second
value == null 8023432.0 Ops/sec
value == undefined 2733237.0 Ops/sec
value === null 7805378.0 Ops/sec
value === undefined 2716115.0 Ops/sec
value === null || value === undefined 2027495.5 Ops/sec
_.isNil(value) 2716826.8 Ops/sec
value != null 7906380.0 Ops/sec
value != undefined 2656111.8 Ops/sec
value !== null 8184160.0 Ops/sec
value !== undefined 2792564.8 Ops/sec
value !== null && value !== undefined 2108010.5 Ops/sec
!_.isNil(value) 2752142.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)