Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0
Firefox 120
Ubuntu
Desktop
2 years ago
Benchmark.js
destructuring with defaults, empty input
29.9M/s
destructuring with defaults, find item
22.7M/s
destructuring dynamic key
21.2M/s
lodash dynamic key using array
7.5M/s
lodash dynamic key using manually cached array
7.4M/s
lodash get, empty input
3.6M/s
lodash get, find item
3.1M/s
lodash dynamic key
2.0M/s
View exact numbers
Test name Executions per second
destructuring with defaults, empty input 29,862,662 Ops/sec
destructuring with defaults, find item 22,714,508 Ops/sec
destructuring dynamic key 21,165,408 Ops/sec
lodash dynamic key using array 7,539,360 Ops/sec
lodash dynamic key using manually cached array 7,413,999 Ops/sec
lodash get, empty input 3,573,532 Ops/sec
lodash get, find item 3,061,923 Ops/sec
lodash dynamic key 2,021,725 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: