Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
lodash forEach vs native for
(version: 0)
Comparing performance of:
lodash vs native
Created:
5 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
a = [{ id: 1, aux: true }, { id: 2, aux: true }, { id: 3, aux: true }]
Tests:
lodash
_.forEach(a, option => { if (option.id === 3) { option.aux = true; } else { option.aux = false; } });
native
for (let i = 0; i < a.length; i++) { const option = a[i]; if (option.id == 3) { option.aux = true ; } else { option.aux = false; } }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
lodash
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 for-in vs native for-in (lodash version: 4.17.10)
Lodash _.forEach vs Object forEach
lodash.each vs Object.forEach vs Native for
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?