Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
uniq vs [new Set()]
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:148.0) Gecko/20100101 Firefox/148.0
Browser:
Firefox 148
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
4 months ago
Test name
Executions per second
_.uniq(arrayOfOptions)
12365202.0 Ops/sec
[...new Set(arrayOfOptions)]
3001485.5 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/g/lodash@4(lodash.min.js+lodash.fp.min.js)"></script>
Script Preparation code:
const arrayOfOptions = [1, 2, 3, 7, 2, 4, 5, 6, 7]
Tests:
_.uniq(arrayOfOptions)
_.uniq(arrayOfOptions)
[...new Set(arrayOfOptions)]
[...new Set(arrayOfOptions)]