Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
Chrome 86
Linux
Desktop
4 years ago
Test name Executions per second
value == null 15099071.0 Ops/sec
value == undefined 5041695.0 Ops/sec
value === null 14743230.0 Ops/sec
value === undefined 5378467.5 Ops/sec
value === null || value === undefined 3858838.0 Ops/sec
_.isNil(value) 4949623.0 Ops/sec
value != null 15628167.0 Ops/sec
value != undefined 5362164.0 Ops/sec
value !== null 15116623.0 Ops/sec
value !== undefined 5238689.0 Ops/sec
value !== null && value !== undefined 3931620.2 Ops/sec
!_.isNil(value) 4968606.5 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)


;