Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Lodash vs Js Native
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Browser:
Chrome 120
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
lodash.forEach
6.7M/s
Js Native
3.9M/s
View exact numbers
Test name
Executions per second
✓
lodash.forEach
6,661,459 Ops/sec
Js Native
3,865,968 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script>
Script Preparation code:
var values = [{ a: 30000 }, { b: 300000 }, { c: 3000000 }]
Tests:
lodash.forEach
var count = 0; _.forEach(values, function(v,i) { if (v.a != null) { count++; } })
Js Native
var count = 0; for (var i = 0; i < values.length; i++) { if (values[i].a != null) { count++; } }