Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121
Linux
Desktop
10 months ago
Test name Executions per second
value == null 15186971.0 Ops/sec
value == undefined 5990145.0 Ops/sec
value === null 15125509.0 Ops/sec
value === undefined 5895150.0 Ops/sec
value === null || value === undefined 4432824.0 Ops/sec
_.isNil(value) 5717650.5 Ops/sec
value != null 15039897.0 Ops/sec
value != undefined 6031553.0 Ops/sec
value !== null 14866470.0 Ops/sec
value !== undefined 6014066.5 Ops/sec
value !== null && value !== undefined 4510074.0 Ops/sec
!_.isNil(value) 5753311.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)