Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Chrome 103
Windows
Desktop
2 years ago
Test name Executions per second
value == null 13907196.0 Ops/sec
value == undefined 4856051.5 Ops/sec
value === null 13585343.0 Ops/sec
value === undefined 4844879.5 Ops/sec
value === null || value === undefined 3544497.2 Ops/sec
_.isNil(value) 4784239.0 Ops/sec
value != null 13139192.0 Ops/sec
value != undefined 4495236.0 Ops/sec
value !== null 12619026.0 Ops/sec
value !== undefined 4673131.0 Ops/sec
value !== null && value !== undefined 3493467.8 Ops/sec
!_.isNil(value) 4682167.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)


;