Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Chrome 117
Linux
Desktop
one year ago
Test name Executions per second
value == null 36594156.0 Ops/sec
value == undefined 12953933.0 Ops/sec
value === null 34819944.0 Ops/sec
value === undefined 12706708.0 Ops/sec
value === null || value === undefined 9417480.0 Ops/sec
_.isNil(value) 11995516.0 Ops/sec
value != null 35126084.0 Ops/sec
value != undefined 12676995.0 Ops/sec
value !== null 35127708.0 Ops/sec
value !== undefined 12614375.0 Ops/sec
value !== null && value !== undefined 9342046.0 Ops/sec
!_.isNil(value) 11413088.0 Ops/sec
!value 35103504.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)

  • !value