Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
lodash forEach vs for i loop123123123
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 13; Mobile; rv:142.0) Gecko/142.0 Firefox/142.0
Browser:
Firefox Mobile 142
Operating system:
Android
Device Platform:
Mobile
Date tested:
8 months ago
Test name
Executions per second
lodash.forEach
5065384.5 Ops/sec
native
940238720.0 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/lodash/4.16.0/lodash.min.js"></script>
Script Preparation code:
var values = {aa:{a: 30310}, bb:{b: 100303}, cc:{c: 3040494}}
Tests:
lodash.forEach
var count = 0; _.forEach(values, function(v,i) { if (v.a != null) { count++; } })
native
var count = 0; for (var i = 0; i < values.length; i++) { if (values[i].a != null) { count++; } }