Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
lodash foreach vs for const loop
(version: 0)
Comparing performance of:
lodash.each vs native
Created:
3 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/lodash/4.16.0/lodash.min.js"></script>
Script Preparation code:
var values = [{a: 30310}, {b: 100303}, {c: 3040494}]
Tests:
lodash.each
var count = 0; _.forEach(values, function(v,i) { if (v.a != null) { count++; } })
native
var count = 0; for (const v of values) { if (v.a != null) { count++ } }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
lodash.each
native
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
lodash .forEach vs JS forEach
lodash.each vs Object.forEach vs Native for
Lodash foreach vs native foreach
lodash .foreach vs native foreach vs native forof
lodash .foreach vs native foreach vs native for loop
Comments
Confirm delete:
Do you really want to delete benchmark?