Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Lodash union vs new Set() union
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Lodash union
3.9M/s
new Set() union
2.9M/s
View exact numbers
Test name
Executions per second
✓
Lodash union
3,862,328 Ops/sec
new Set() union
2,896,312 Ops/sec
HTML Preparation code:
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script>
Script Preparation code:
const a = [1, 2, 3, 4, 5] const b = [3, 4, 5, 6, 7]
Tests:
Lodash union
const c = _.union(a, b)
new Set() union
const setA = new Set(a) const setB = new Set(b) const c = setA.union(setB)