Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Firefox 59
Windows 7
Desktop
3 years ago
Test name Executions per second
value == null 238640704.0 Ops/sec
value == undefined 125393248.0 Ops/sec
value === null 233058592.0 Ops/sec
value === undefined 114975056.0 Ops/sec
value === null || value === undefined 88929392.0 Ops/sec
_.isNil(value) 84309400.0 Ops/sec
value != null 177320704.0 Ops/sec
value != undefined 117970216.0 Ops/sec
value !== null 228672336.0 Ops/sec
value !== undefined 111059600.0 Ops/sec
value !== null && value !== undefined 81238184.0 Ops/sec
!_.isNil(value) 75874632.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)


;