Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
lodash uniqwith vs map
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Browser:
Firefox 133
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
uniqwith
8.4M/s
map
1.3M/s
View exact numbers
Test name
Executions per second
✓
uniqwith
8,410,245 Ops/sec
map
1,313,236 Ops/sec
HTML Preparation code:
<script src='https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js'></script>
Script Preparation code:
var l = []; for (let i = 0; i < 20; i++) { l.push({ "index": Math.floor(i / 2), "test": "value", "number": 6, "complex": { "name": "steve" } }) }
Tests:
map
const map = new Map(); for (const m of l) { map.set( m.i, m ); } return map;
uniqwith
return _.uniqWith(l, (a, b) => { return a.i === b.i; });