Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
JSON Stringify vs object-hash
(version: 1)
Comparing performance of:
stringify vs Object-hash
Created:
7 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/object-hash@3.0.0/dist/object_hash.min.js"></script>
Script Preparation code:
var context1 = { "formTitle": "User Profile Form", "sections": [{ "sectionTitle": "Personal Information", "fields": [{ "type": "text", "label": "First Name", "name": "firstName", "required": true }, { "type": "text", "label": "Last Name", "name": "lastName", "required": true }, { "type": "email", "label": "Email Address", "name": "email", "required": true } ] }, { "sectionTitle": "Address Details", "fields": [{ "type": "text", "label": "Street Address", "name": "streetAddress", "required": false }, { "type": "text", "label": "City", "name": "city", "required": true }, { "type": "select", "label": "Country", "name": "country", "options": [{ "label": "United States", "value": "USA" }, { "label": "Canada", "value": "CAN" }, { "label": "United Kingdom", "value": "UK" } ], "required": true }, { "type": "group", "label": "Postal Information", "name": "postalInfo", "fields": [{ "type": "text", "label": "Zip/Postal Code", "name": "postalCode", "required": true }, { "type": "checkbox", "label": "Is this a P.O. Box?", "name": "isPOBox", "default": false } ] } ] }, { "sectionTitle": "Preferences", "fields": [{ "type": "checkbox", "label": "Receive Newsletter", "name": "receiveNewsletter", "default": true }, { "type": "group", "label": "Newsletter Frequency", "name": "newsletterFrequency", "condition": { "field": "receiveNewsletter", "operator": "equals", "value": true }, "fields": [{ "type": "radio", "label": "Frequency", "name": "frequency", "options": [{ "label": "Daily", "value": "daily" }, { "label": "Weekly", "value": "weekly" }, { "label": "Monthly", "value": "monthly" } ], "default": "weekly" }] } ] } ] }
Tests:
stringify
JSON.stringify(context1)
Object-hash
objectHash(context1)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
stringify
Object-hash
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
2 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0
Browser/OS:
Chrome 144 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
stringify
815053.8 Ops/sec
Object-hash
1652.6 Ops/sec
Related benchmarks:
cleanJson + delete lock [old vs new]
Find events real
Find events real end
mybencmark115000
Spread vs Object.assign vs Object.keys with forEach deep clone
hash-sum vs object-hash o
JSON.parse() vs. eval() large object
Lodash isEqual vs JSON stringify1
JSON.parse() vs. eval() large object 2
Comments
Confirm delete:
Do you really want to delete benchmark?