Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash union vs. ES6 Set
(version: 1)
Comparing performance of:
Javascript Set ES6 + Array from vs Lodash union vs Javascript Set ES6 + spread operators
Created:
5 years ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var ids = [ 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146513, 146515, 146911, 148275, 148300, 148309, 148310, 148321, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 148275, 148300, 148309, 148310, 148321, 146513, 146515, 146911, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 146513, 146515, 148300, 148310, 146208, 146213, 148275, 146210, 146214, 146911, 148309, 146212, 146215, 148321, 138782, 146208, 146213, 148275, 146210, 146214, 146911, 148309, 146212, 148321, 146215, 138782, 146911, 138782, 146911, 138782, 146911, 146208, 146210, 146212, 146213, 146214, 146215, 148275, 148309, 148321, 146911, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146911, 138782, 146215, 146911, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146911, 138782, 146212, 146911, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 148275, 148309, 148321, 146208, 146210, 146213, 146214, 146911, 146208, 146210, 146212, 146213, 146214, 146215, 148275, 148309, 148321, 146212, 146213, 146214, 146215, 146215, 146911, 146911, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 148275, 148309, 148321, 138782, 138782, 146911, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 146208, 146210, 146212, 146213, 146214, 146215, 148275, 148309, 148321, 146208, 146210, 146212, 146213, 146214, 146215, 148275, 148309, 148321, 146213, 146214, 146215, 146911, 146911, 146911, 138782, 146208, 146213, 148275, 146210, 146214, 146911, 148309, 146212, 148321, 146215, 138782, 146911, 138782, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 138782, 146911, 146208, 146210, 146212, 146213, 146214, 146215, 146911, 148275, 148309, 148321, 146208, 146210, 146212, 146213, 146214, 146215, 148275, 148309, 148321, 146911 ];
Tests:
Javascript Set ES6 + Array from
const result = Array.from(new Set(ids))
Lodash union
const result = _.union(ids)
Javascript Set ES6 + spread operators
const result = [...new Set(ids)]
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Javascript Set ES6 + Array from
Lodash union
Javascript Set ES6 + spread operators
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!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
To solve this problem, we need to analyze the provided input data and determine which benchmark is faster. Firstly, let's look at the benchmark results: 1. **Javascript Set ES6 + Array from**: 155198.5625 executions per second 2. **Lodash union**: 84776.9140625 executions per second 3. **Javascript Set ES6 + spread operators**: 143841.5625 executions per second The fastest benchmark is the `Javascript Set ES6 + Array from` with an execution rate of 155198.5625 executions per second. Given this information, we can provide a response that indicates which benchmark is faster without requiring further input or processing of other test cases.
Related benchmarks:
array find vs _.find [1000 itens]
IndexOf vs Includes vs lodash includes 1231
Lodash union VS ES6 Set
uniq vs Set large
Comments
Confirm delete:
Do you really want to delete benchmark?