Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Windows
Desktop
one year ago
Test name Executions per second
value == null 40483736.0 Ops/sec
value == undefined 14210762.0 Ops/sec
value === null 40279864.0 Ops/sec
value === undefined 14130048.0 Ops/sec
value === null || value === undefined 9624793.0 Ops/sec
_.isNil(value) 13705230.0 Ops/sec
value != null 40550800.0 Ops/sec
value != undefined 14054001.0 Ops/sec
value !== null 40342612.0 Ops/sec
value !== undefined 14064675.0 Ops/sec
value !== null && value !== undefined 10466202.0 Ops/sec
!_.isNil(value) 13503312.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)


;