This benchmark compares the performance of lodash's `has` function with native JavaScript code for checking if an object has a specific property. The lodash `has` function checks if `path` is a direct property of `object`. The native JavaScript code uses the `in` operator to check if an object has a specific property.
Comparing performance of: lodash.has vs Native JavaScript
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
lodash.has
Native JavaScript
Fastest:N/A
Slowest:N/A
ⓘGet performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date:
one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36