Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1.1 Safari/605.1.15
Safari 18
Mac OS X 10.15.7
Desktop
25 days ago
Test name Executions per second
value == null 529515296.0 Ops/sec
value == undefined 523890048.0 Ops/sec
value === null 544101760.0 Ops/sec
value === undefined 504343968.0 Ops/sec
value === null || value === undefined 522571392.0 Ops/sec
_.isNil(value) 520104736.0 Ops/sec
value != null 529663296.0 Ops/sec
value != undefined 536848640.0 Ops/sec
value !== null 519609600.0 Ops/sec
value !== undefined 538403584.0 Ops/sec
value !== null && value !== undefined 561518016.0 Ops/sec
!_.isNil(value) 542727616.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)