Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash _.union vs native Set() and Set to Array
(version: 0)
Comparing performance of:
_.union vs Set() vs Set() convert back to array
Created:
3 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script>
Script Preparation code:
var a = [1, 2, 3, 4, 5] var b = [3, 4, 5, 6, 7]
Tests:
_.union
var c = _.union(a, b)
Set()
var c = new Set(a, b)
Set() convert back to array
var c = [...new Set(a, b)]
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
_.union
Set()
Set() convert back to array
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:
_.union vs native Set() implementation
Lodash union vs native Set() implementation
Lodash union vs Native Javascript
Corrected Lodash _.union vs native Set()
lodash union vs native set spread
Comments
Confirm delete:
Do you really want to delete benchmark?