Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
hash-sum vs object-hash vs JSON (with array)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Safari/605.1.15
Browser:
Safari 18
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Sum
173662.2 Ops/sec
Object-hash
13209.0 Ops/sec
JSON.stringify
5943527.5 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:
Sum
sum(context1) === sum(context2)
Object-hash
objectHash(context1) === objectHash(context2)
JSON.stringify
JSON.stringify(context1) === JSON.stringify(context2)