Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1
Mobile Safari 16
iOS 16.3.1
Mobile
8 months ago
Test name Executions per second
destructuring with defaults, empty input 13051780.0 Ops/sec
lodash get, empty input 2186361.0 Ops/sec
destructuring with defaults, find item 11000560.0 Ops/sec
lodash get, find item 1966528.0 Ops/sec
destructuring dynamic key 10719960.0 Ops/sec
lodash dynamic key 1618562.0 Ops/sec
lodash dynamic key using array 4620461.0 Ops/sec
lodash dynamic key using manually cached array 4296914.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