Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash Difference vs. Filter
(version: 1)
Comparing performance of:
Lodash vs Filter
Created:
one year ago
by:
Registered User
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 = ["America", "Brazil", "China", "Denmark", "Equador", "Finland", "Germany", "Haiti", "Indonesia", "Japan", "Kiribati"] var b = ["Haiti", "Indonesia", "Japan", "Kiribati"]
Tests:
Lodash
var c = _.difference(a, b)
Filter
var c = a.filter(x => b.includes(x));
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Lodash
Filter
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0
Browser/OS:
Chrome 136 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Lodash
1795754.2 Ops/sec
Filter
532684.1 Ops/sec
Related benchmarks:
lodash.each vs Object.forEach
filter Lodash vs Vanilla
Lodash: difference vs filter
_.difference vs. native
Lodash: differenceBy vs filter & some
foreach vs some and filter
lodash difference vs array filter
filter vs lodash diff1
filter vs lodash diff2
Comments
Confirm delete:
Do you really want to delete benchmark?