Performance of Object.values(obj) vs_.values() vs for-in to extract values from an object (version: 0)
Compare performance between the native Object.values(obj) function vs the lodash _.values() option and a function that extracts the values of an object using a for...in loop.
Comparing performance of: Object.values(obj) vs _.values(obj) vs for-in
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory
Test case name
Result
Object.values(obj)
_.values(obj)
for-in
Fastest:N/A
Slowest:N/A
Latest run results:
Run details: (Test run date:
4 years ago)
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0