optional chain vs lodash get with array vs lodash get with stringFastest: optional chain (5.6x faster)
32,559,458 ops/sec
8,454,808 ops/sec
5,855,256 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| optional chain | |
| lodash get with array | |
| lodash get with string |
| Test name | Executions per second |
|---|---|
| ✓ optional chain | 118,963,912 Ops/sec |
| lodash get with array | 8,819,181 Ops/sec |
| lodash get with string | 4,307,169 Ops/sec |