Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash.isEqual vs JSON.stringify fort object
(version: 0)
Comparing performance of:
_.isEqual vs JSON.stringify
Created:
4 years ago
by:
Guest
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:
window.foo = [ { taskItemId: '1', text: 'Watch the Getting Started Video', isCompleted: false, isDeleted: false, associatedLink: '', associatedWalkthrough: '', }, { taskItemId: '2', text: 'Set up your profile', isCompleted: false, isDeleted: false, associatedLink: '', associatedWalkthrough: '', }, { taskItemId: '3', text: 'Invite a colleague', isCompleted: false, isDeleted: false, associatedLink: '', associatedWalkthrough: '', }, ]; window.bar = [ { taskItemId: '1', text: 'Watch the Getting Started Video', isCompleted: false, isDeleted: false, associatedLink: '', associatedWalkthrough: '', }, { taskItemId: '2', text: 'Set up your profile', isCompleted: false, isDeleted: false, associatedLink: '', associatedWalkthrough: '', }, { taskItemId: '3', text: 'Invite a colleague', isCompleted: false, isDeleted: false, associatedLink: '', associatedWalkthrough: '', }, ];
Tests:
_.isEqual
_.isEqual(window.foo, window.bar)
JSON.stringify
JSON.stringify(window.foo) === JSON.stringify(window.bar);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
_.isEqual
JSON.stringify
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!
Related benchmarks:
_.isEqual vs toString() vs JSON.stringify
Lodash.isEqual vs JSON.stringify Equality Comparison for Plain Objects
Lodash.isEqual 4.17.15 vs JSON.stringify Equality
Lodash.isEqual vs JSON.stringify vs direct comparision of two elements
Lodash.isEqual vs JSON.stringify
Comments
Confirm delete:
Do you really want to delete benchmark?