Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Ubuntu
Desktop
one year ago
Test name Executions per second
value == null 20520382.0 Ops/sec
value == undefined 7659093.0 Ops/sec
value === null 20566080.0 Ops/sec
value === undefined 8899091.0 Ops/sec
value === null || value === undefined 5619111.0 Ops/sec
_.isNil(value) 5365738.5 Ops/sec
value != null 23446348.0 Ops/sec
value != undefined 6019399.5 Ops/sec
value !== null 23766946.0 Ops/sec
value !== undefined 7667598.0 Ops/sec
value !== null && value !== undefined 6245857.5 Ops/sec
!_.isNil(value) 8880114.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)