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
Test name
Executions per second
map
1313235.6 Ops/sec
uniqwith
8410245.0 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; });