Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
Chrome 67
Mac OS X 10.13.4
Desktop
5 years ago
Test name Executions per second
Lodash when not null 1866468.0 Ops/sec
Try... Catch w/o Exception 6378297.0 Ops/sec
Lodash when undefined 1623087.0 Ops/sec
Try... Catch w/ Exception 6413549.0 Ops/sec
Native 12444920.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Lodash when not null

  • Try... Catch w/o Exception

  • Lodash when undefined

  • Try... Catch w/ Exception

  • Native