native approach with reduce vs native approach fromEntries vs lodash mapValuesFastest: lodash mapValues (15.7x faster)
4,479,920 ops/sec
324,525 ops/sec
286,133 ops/sec
Fastest: lodash mapValues (28.7x faster)
3,116,650 ops/sec
114,670 ops/sec
108,751 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| native approach with reduce | |
| native approach fromEntries | |
| lodash mapValues |
| Test name | Executions per second |
|---|---|
| ✓ lodash mapValues | 14,709,377 Ops/sec |
| native approach with reduce | 561,685 Ops/sec |
| native approach fromEntries | 528,806 Ops/sec |