Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
Chrome 110
Windows
Desktop
one year ago
Test name Executions per second
value == null 27215938.0 Ops/sec
value == undefined 9111960.0 Ops/sec
value === null 26989716.0 Ops/sec
value === undefined 9125824.0 Ops/sec
value === null || value === undefined 6822194.0 Ops/sec
_.isNil(value) 8907961.0 Ops/sec
value != null 27273496.0 Ops/sec
value != undefined 9182779.0 Ops/sec
value !== null 27287468.0 Ops/sec
value !== undefined 9138935.0 Ops/sec
value !== null && value !== undefined 6873377.5 Ops/sec
!_.isNil(value) 9043395.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)


;