Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0
Firefox 124
Windows
Desktop
2 years ago
Benchmark.js
destructuring with defaults, empty input
33.5M/s
destructuring with defaults, find item
26.4M/s
destructuring dynamic key
24.2M/s
lodash dynamic key using array
7.1M/s
lodash dynamic key using manually cached array
6.9M/s
lodash get, empty input
3.4M/s
lodash get, find item
2.9M/s
lodash dynamic key
1.9M/s
View exact numbers
Test name Executions per second
destructuring with defaults, empty input 33,477,026 Ops/sec
destructuring with defaults, find item 26,400,956 Ops/sec
destructuring dynamic key 24,212,972 Ops/sec
lodash dynamic key using array 7,133,372 Ops/sec
lodash dynamic key using manually cached array 6,933,165 Ops/sec
lodash get, empty input 3,356,590 Ops/sec
lodash get, find item 2,902,919 Ops/sec
lodash dynamic key 1,906,934 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: