Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1
Mobile Safari 17
iOS 17.5.1
Mobile
4 months ago
Test name Executions per second
destructuring with defaults, empty input 9291798.0 Ops/sec
lodash get, empty input 1962438.0 Ops/sec
destructuring with defaults, find item 8083448.5 Ops/sec
lodash get, find item 1616290.6 Ops/sec
destructuring dynamic key 6597049.0 Ops/sec
lodash dynamic key 1456100.1 Ops/sec
lodash dynamic key using array 2454521.0 Ops/sec
lodash dynamic key using manually cached array 2441864.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 dynamic key

  • lodash dynamic key

  • lodash dynamic key using array

  • lodash dynamic key using manually cached array