Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
object-hash md5 vs JSON.stringify
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0
Browser:
Firefox 138
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
JSON.stringify
730621.5 Ops/sec
md5
2899.6 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/hash-sum@2.0.0/hash-sum.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/object-hash@2.0.3/dist/object_hash.min.js"></script>
Script Preparation code:
var context1 = { title: 'fish', position: 1, array: [1, 2, 3, [4, 5, 6]], } var context2 = { title: 'fish', position: 1, array: [1, 2, 3, [4, 5, 6]], array2: [{}, {}, {}], }
Tests:
JSON.stringify
JSON.stringify(context1) === JSON.stringify(context2)
md5
objectHash(context1, { algorithm: "md5", encoding: "base64", unorderedArrays: true, unorderedSets: true, unorderedObjects: true, }) === objectHash(context2, { algorithm: "md5", encoding: "base64", unorderedArrays: true, unorderedSets: true, unorderedObjects: true, })