Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Chrome 84
Mac OS X 10.15.4
Desktop
3 years ago
Test name Executions per second
Destructuring with defaults, empty input 7883550.0 Ops/sec
Selectn get, empty input 1602155.0 Ops/sec
Destructuring with defaults, find item 2261584.0 Ops/sec
Selectn get, find item 1055541.0 Ops/sec
Destructuring null input 0.0 Ops/sec
Selectn null input 1662924.0 Ops/sec
Destructuring undefined input 0.0 Ops/sec
Lodash undefined input 1693683.0 Ops/sec
Destructuring dynamic key 2213865.0 Ops/sec
Lodash dynamic key 1021421.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Destructuring with defaults, empty input

  • Selectn get, empty input

  • Destructuring with defaults, find item

  • Selectn get, find item

  • Destructuring null input

  • Selectn null input

  • Destructuring undefined input

  • Lodash undefined input

  • Destructuring dynamic key

  • Lodash dynamic key