Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
intersection lodash
(version: 1)
Comparing performance of:
set vs lodash
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
Script Preparation code:
var arr1 = ['sections-a', 'sections-b', 'sections-c', 'sections-d', 'sections-e', 'sections-f']; var arr2 = ['sections-a', 'sections-b', 'sections-b', 'sections-b', 'sections-b', 'sections-b'];
Tests:
set
const arrSet = new Set(arr1) const filtered = arr2.filter( value => arrSet.has(value))
lodash
_.intersection(arr1, arr2)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
set
lodash
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
7 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36 Edg/140.0.0.0
Browser/OS:
Chrome 140 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
set
8249483.5 Ops/sec
lodash
3958724.5 Ops/sec
Related benchmarks:
twoja stara
twoja stara2
twoja stara3
twoja stara4
twoja stara5
lodash intersect vs filter2
lodash difference vs array filter
lodash.intersection vs Vanilla JS
Lodash vs Set Intersection vs includes vs indexOf
Comments
Confirm delete:
Do you really want to delete benchmark?