Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_6 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0 Mobile/15D100 Safari/604.1
Mobile Safari 11
iOS 11.2.6
iPhone
6 years ago
Test name Executions per second
destructuring with defaults, empty input 4343300.5 Ops/sec
lodash get, empty input 806082.9 Ops/sec
destructuring with defaults, find item 3775327.2 Ops/sec
lodash get, find item 777018.0 Ops/sec
destructuring null input 0.0 Ops/sec
lodash null input 2724946.8 Ops/sec
destructuring undefined input 0.0 Ops/sec
lodash undefined input 2699531.8 Ops/sec
destructuring dynamic key 3928914.8 Ops/sec
lodash dynamic key 797664.9 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