Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
lodashuniq2
(version: 0)
Comparing performance of:
lodash vs set
Created:
9 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.2/lodash.js"></script>
Script Preparation code:
function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min)) + min; } var categories = []; for (var i = 0; i < 1000; i++) { categories[i] = getRandomInt(1,100); }
Tests:
lodash
var uniqueCategories = _(categories).uniq().value();
set
var uniqueCategories = [...new Set(categories)];
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
lodash
set
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
lodashuniq
Lodash max vs Math.max (lodash 4.7.11)
Labels
ramda lodash sortBy
Comments
Confirm delete:
Do you really want to delete benchmark?