Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0
Firefox 86
Mac OS X 10.16
Desktop
3 years ago
Test name Executions per second
destructuring with defaults, empty input 60629100.0 Ops/sec
lodash get, empty input 3890203.0 Ops/sec
destructuring with defaults, find item 26337770.0 Ops/sec
lodash get, find item 3180769.0 Ops/sec
destructuring dynamic key 26432190.0 Ops/sec
lodash dynamic key 2637647.0 Ops/sec
lodash dynamic key using array 9455712.0 Ops/sec
lodash dynamic key using manually cached array 7196135.0 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