Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 YaBrowser/21.3.3.230 Yowser/2.5 Safari/537.36
Yandex Browser 21
Windows
Desktop
2 years ago
Test name Executions per second
destructuring with defaults, empty input 6176217.0 Ops/sec
lodash get, empty input 1772397.0 Ops/sec
destructuring with defaults, find item 2070826.0 Ops/sec
lodash get, find item 1083795.0 Ops/sec
destructuring dynamic key 2077944.0 Ops/sec
lodash dynamic key 791112.8 Ops/sec
lodash dynamic key using array 1330762.0 Ops/sec
lodash dynamic key using manually cached array 1329597.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