Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
hash-sum vs object-hash vs JSON.stringify
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:136.0) Gecko/20100101 Firefox/136.0
Browser:
Firefox 136
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Sum
412716.1 Ops/sec
Object-hash
19737.3 Ops/sec
JSON.stringify
7113104.0 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 } var context2 = { title: 'fish', position: 1 }
Tests:
Sum
sum(context1) === sum(context2)
Object-hash
objectHash(context1) === objectHash(context2)
JSON.stringify
JSON.stringify(context1) === JSON.stringify(context2)