Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0
Firefox 88
Ubuntu
Desktop
3 years ago
Test name Executions per second
destructuring with defaults, empty input 43227048.0 Ops/sec
lodash get, empty input 2676964.2 Ops/sec
destructuring with defaults, find item 20400872.0 Ops/sec
lodash get, find item 1934314.1 Ops/sec
destructuring dynamic key 20856388.0 Ops/sec
lodash dynamic key 1662554.8 Ops/sec
lodash dynamic key using array 6834095.0 Ops/sec
lodash dynamic key using manually cached array 4486387.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • destructuring with defaults, empty input

  • lodash get, empty input

  • destructuring with defaults, find item

  • lodash get, find item

  • destructuring dynamic key

  • lodash dynamic key

  • lodash dynamic key using array

  • lodash dynamic key using manually cached array