Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash DifferenceWith vs Pure JS
(version: 1)
Comparing performance of:
Pure JS vs Lodash diffrenceWith
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 oldArr = [ { "id": 52 }, { "id": 76 }, { "id": 13 }, { "id": 96 }, { "id": 27 }, { "id": 8 }, { "id": 23 }, { "id": 63 }, { "id": 25 } ] var newArr = [ 52, 76, 13, 96, 27, 8, 23, 63, 25, 1 ]
Tests:
Pure JS
const currentIds = new Set(oldArr.map(e => e.id)); newArr.filter(id => !currentIds.has(id));
Lodash diffrenceWith
_.differenceWith(newArr, oldArr, (v, e) => v === e.id);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Pure JS
Lodash diffrenceWith
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
10 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 Edg/137.0.0.0
Browser/OS:
Chrome 137 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Pure JS
4076624.2 Ops/sec
Lodash diffrenceWith
4645219.0 Ops/sec
Related benchmarks:
Remove duplicate: Pure JS VS Lodash
Lodash DifferenceWith vs Native
Lodash CloneDeep vs Native spread
Lodash CloneDeep vs Native spread - LARGE
diffenceWith
Lodash vs VanilaJS
Lodash DifferenceWith vs Native (foo)
Lodash DifferenceWith vs Native 2
lodash vs native skv
Comments
Confirm delete:
Do you really want to delete benchmark?