Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Chrome 115
Windows
Desktop
one year ago
Test name Executions per second
value == null 13710901.0 Ops/sec
value == undefined 4960094.5 Ops/sec
value === null 13321226.0 Ops/sec
value === undefined 4816058.0 Ops/sec
value === null || value === undefined 3612589.5 Ops/sec
_.isNil(value) 4705021.5 Ops/sec
value != null 13435995.0 Ops/sec
value != undefined 4920169.5 Ops/sec
value !== null 13665218.0 Ops/sec
value !== undefined 5028246.5 Ops/sec
value !== null && value !== undefined 3685577.5 Ops/sec
!_.isNil(value) 4764119.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)


;