Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Lodash uniqWith vs Set with options
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6 Safari/605.1.15
Browser:
Safari 26
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one month ago
Benchmark engine:
Benchmark.js
Set with Array.from
989K/s
Lodash uniqWith
953K/s
Set with Spread
927K/s
View exact numbers
Test name
Executions per second
✓
Set with Array.from
988,504 Ops/sec
Lodash uniqWith
953,459 Ops/sec
Set with Spread
926,755 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 with Spread
copy = [...new Set(array.map(a => a.value))]
Set with Array.from
copy = Array.from(new Set(array.map(a => a.value)))