Run details:
Mozilla/5.0 (Linux; Android 11; Mi 9T Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Mobile Safari/537.36
Chrome Mobile 92
Android
Mobile
2 years ago
Test name Executions per second
destructuring with defaults, empty input 3555898.0 Ops/sec
lodash get, empty input 1148058.0 Ops/sec
destructuring with defaults, find item 1025260.0 Ops/sec
lodash get, find item 654878.1 Ops/sec
destructuring null input 0.0 Ops/sec
lodash null input 1445212.0 Ops/sec
destructuring undefined input 0.0 Ops/sec
lodash undefined input 1439598.0 Ops/sec
destructuring dynamic key 1064277.0 Ops/sec
lodash dynamic key 657466.8 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 null input

  • lodash null input

  • destructuring undefined input

  • lodash undefined input

  • destructuring dynamic key

  • lodash dynamic key