Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.81 Safari/537.36
Chrome 98
Windows
Desktop
2 years ago
Test name Executions per second
value == null 7864853.5 Ops/sec
value == undefined 3015130.5 Ops/sec
value === null 8470657.0 Ops/sec
value === undefined 3057788.2 Ops/sec
value === null || value === undefined 2249354.2 Ops/sec
_.isNil(value) 3003452.0 Ops/sec
value != null 8524130.0 Ops/sec
value != undefined 3049497.0 Ops/sec
value !== null 8533537.0 Ops/sec
value !== undefined 3095745.0 Ops/sec
value !== null && value !== undefined 2228688.8 Ops/sec
!_.isNil(value) 3067729.5 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)


;