Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Windows
Desktop
one year ago
Test name Executions per second
value == null 26382400.0 Ops/sec
value == undefined 9166841.0 Ops/sec
value === null 26141396.0 Ops/sec
value === undefined 9281677.0 Ops/sec
value === null || value === undefined 6888159.5 Ops/sec
_.isNil(value) 8590407.0 Ops/sec
value != null 25758702.0 Ops/sec
value != undefined 9177267.0 Ops/sec
value !== null 25907142.0 Ops/sec
value !== undefined 9359016.0 Ops/sec
value !== null && value !== undefined 6868430.5 Ops/sec
!_.isNil(value) 8684667.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)


;