Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36 Edg/94.0.992.50
Chrome 94
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
value == null 23335618.0 Ops/sec
value == undefined 8496534.0 Ops/sec
value === null 23346058.0 Ops/sec
value === undefined 8518208.0 Ops/sec
value === null || value === undefined 6248611.5 Ops/sec
_.isNil(value) 7740496.5 Ops/sec
value != null 23124704.0 Ops/sec
value != undefined 8439627.0 Ops/sec
value !== null 21895312.0 Ops/sec
value !== undefined 8368782.5 Ops/sec
value !== null && value !== undefined 6245857.0 Ops/sec
!_.isNil(value) 7681379.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)


;