Performance of Object.values(obj) vs_.values() vs for...in to extract values from an object with 1000 entries-2 (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:
one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.183