Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Windows
Desktop
2 years ago
Benchmark.js
destructuring with defaults, empty input
8.8M/s
destructuring dynamic key
5.6M/s
destructuring with defaults, find item
5.5M/s
lodash dynamic key using array
2.8M/s
lodash dynamic key using manually cached array
2.7M/s
lodash get, empty input
2.6M/s
lodash get, find item
2.1M/s
lodash dynamic key
1.5M/s
View exact numbers
Test name Executions per second
destructuring with defaults, empty input 8,849,296 Ops/sec
destructuring dynamic key 5,582,105 Ops/sec
destructuring with defaults, find item 5,456,000 Ops/sec
lodash dynamic key using array 2,754,912 Ops/sec
lodash dynamic key using manually cached array 2,705,574 Ops/sec
lodash get, empty input 2,569,186 Ops/sec
lodash get, find item 2,089,544 Ops/sec
lodash dynamic key 1,481,609 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: