Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Linux
Desktop
one year ago
Test name Executions per second
value == null 11302197.0 Ops/sec
value == undefined 11262906.0 Ops/sec
value === null 11257614.0 Ops/sec
value === undefined 3906272.8 Ops/sec
value === null || value === undefined 2896185.2 Ops/sec
_.isNil(value) 3814302.5 Ops/sec
value != null 11328180.0 Ops/sec
value != undefined 11185611.0 Ops/sec
value !== null 11271581.0 Ops/sec
value !== undefined 3950024.2 Ops/sec
value !== null && value !== undefined 2939169.2 Ops/sec
!_.isNil(value) 3801553.2 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)