Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
lodash uniq vs set while returning array
(version: 1)
Comparing performance of:
Set vs Array
Created:
6 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js'></script>
Tests:
Set
var l = new Set([1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]); return Array.from(l);
Array
var l = [1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]; return _.uniq(l);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Set
Array
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
6 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Browser/OS:
Chrome 142 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Set
10612446.0 Ops/sec
Array
34118984.0 Ops/sec
Related benchmarks:
Lodash's uniq vs Array from Set
lodash uniq vs array from set
lodash uniq vs set with array.from
uniq vs set to array
_.uniq vs Array.from(new Set())
lodash uniq vs set into array
lodash uniq vs array.from set
lodash uniq vs Array.from(new Set)
lodash uniq vs set + Array.from
Comments
Confirm delete:
Do you really want to delete benchmark?