Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Lodash uniqWith vs Set with an Object
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/150.0.0.0 Safari/537.36 Edg/150.0.0.0
Browser:
Chrome 150
Operating system:
Windows
Device Platform:
Desktop
Date tested:
10 hours ago
Lodash uniqWith
1.0M/s
Set
769K/s
View exact numbers
Test name
Executions per second
✓
Lodash uniqWith
1,025,555 Ops/sec
Set
768,754 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js'></script>
Script Preparation code:
var array = Array.from(new Array(120), () => ({ name: 'Name', value: Math.floor(Math.random() * 40) })); var copy = null
Tests:
Lodash uniqWith
copy = _.uniq(array.map(a => a.value))
Set
copy = [...new Set(array.map(a => a.value))]