Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
lodash isEqual vs object-hash compare hashes (md5 test)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser:
Chrome 135
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
stringify md5
7799.5 Ops/sec
#hashes
2012.4 Ops/sec
isEqual (objects)
1106034.4 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/object-hash@3.0.0/dist/object_hash.min.js"></script>
Script Preparation code:
window.testObj1 = { _id: "6241bf1d424cff26638d7a5a", index: 0, guid: "a5764c7c-e6c4-45a8-90c5-975c06d8a76f", isActive: true, balance: "$1,378.60", picture: "http://placehold.it/32x32", age: 28, eyeColor: "green", name: "Prince Farrell", gender: "male", company: "PAPRIKUT", email: "princefarrell@paprikut.com", phone: "+1 (977) 406-2526", address: "872 Garden Street, Stockdale, Delaware, 9634", about: "Laborum minim mollit qui eiusmod veniam est. In labore enim cillum enim cillum magna dolor magna amet id ex ea nulla nostrud. Ipsum est laborum et consectetur pariatur nostrud magna. Nulla pariatur cillum et proident labore ad ipsum deserunt.\r\n", registered: "2021-07-31T02:37:28 -03:00", latitude: -83.931425, longitude: 41.147296, tags: [ "irure", "sint", "adipisicing", "nostrud", "sint", "in", "magna" ], friends: [{ id: 0, name: "Owen Price" }, { id: 1, name: "Cain Key" }, { id: 2, name: "Josie Hatfield" } ], greeting: "Hello, Prince Farrell! You have 10 unread messages.", favoriteFruit: "banana" }; window.testObj2 = { _id: "5464564563456356", index: 0, guid: "a5764c7c-e6c4-45a8-90c5-975c556506d8a76f", isActive: false, balance: "$1,378.60", picture: "http://placehold.it/32x32", age: 28, eyeColor: "red", name: "Prince Farrell", gender: "male", company: "PAPRIKUT", email: "princefarrell@paprikut.com", phone: "+1 (977) 406-2526", address: "872 Garden Street, Stockdale, Delaware, 9634", about: "Laborum minim fffff qui eiusmod veniam est. In labore enim cillum enim cillum magna dolor magna amet id ex ea nulla nostrud. Ipsum est laborum et consectetur pariatur nostrud magna. Nulla pariatur cillum et proident labore ad ipsum deserunt.\r\n", registered: "2021-07-31T02:37:28 -03:00", latitude: -83.931425, longitude: 41.147296, tags: [ "irure", "sint", "adipisicing", "nostrud", "sint", "in", "magna", "test" ], friends: [{ id: 0, name: "Owen Price" }, { id: 1, name: "Cain Key" }, ], greeting: "Hello, Prince Farrell! You have 10 unread messages.", favoriteFruit: "potato" }
Tests:
stringify md5
testObj2.age = Math.random(); testObj2.index = Math.random(); const testObjHash1 = objectHash(JSON.stringify(testObj1), {algorithm: 'md5'}); const testObjHash2 = objectHash(JSON.stringify(testObj2), {algorithm: 'md5'}); testObj1 === testObj2;
#hashes
testObj2.age = Math.random(); testObj2.index = Math.random(); const testObjHash1 = objectHash(testObj1, {algorithm: 'md5'}); const testObjHash2 = objectHash(testObj2, {algorithm: 'md5'}); testObj1 === testObj2;
isEqual (objects)
testObj2.age = Math.random(); testObj2.index = Math.random(); _.isEqual(testObj1, testObj2);