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:
11 months ago
native
940.2M/s
lodash.forEach
5.1M/s
View exact numbers
Test name
Executions per second
✓
native
940,238,720 Ops/sec
lodash.forEach
5,065,384 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++; } }