Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
JSON vs JS v2
(version: 0)
Comparing performance of:
JSON vs JS
Created:
4 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script id="jsonProps"></script> <script id="jsProps"></script>
Script Preparation code:
window.opbox = { boxProperties: {} }; window.jsProps = document.querySelector('#jsProps'); window.jsonProps = document.querySelector('#jsonProps');
Tests:
JSON
const newJsonProps = document.createElement('script'); newJsonProps.innerHTML = `{"fullscreenVariant":null,"enableSmallSuggestionImages":false,"advancedSearchCriterias":[{"checked":false,"id":"searchInDescriptionChange","label":"szukaj też w opisach ofert","queryParameter":{"value":"1","key":"description"}}],"enableCustomPerformanceMarks":true,"enableFullscreen":false,"enableRewriteSuggestionButton":true,"enableSuggesterHistory":true,"enableSuggestionRemovalButtonOnHover":false,"enableSuggestionsForEmptyPhrase":true,"filters":{"list":[{"name":"Wszystkie kategorie","url":"\u002Flisting","type":"ALL"},{"code":"household","name":"Dom i ogród","alias":"dom-i-ogrod","id":"5","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fdom-i-ogrod"},{"code":"baby","name":"Dziecko","alias":"dziecko","id":"11763","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fdziecko"},{"code":"electronics","name":"Elektronika","alias":"elektronika","id":"42540aec-367a-4e5e-b411-17c09b08e41f","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Felektronika"},{"code":"company","name":"Firma i usługi","alias":"firma","id":"4bd97d96-f0ff-46cb-a52c-2992bd972bb1","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Ffirma"},{"code":"collections.art","name":"Kolekcje i sztuka","alias":"kolekcje-i-sztuka","id":"a408e75a-cede-4587-8526-54e9be600d9f","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fkolekcje-i-sztuka"},{"code":"culture.entertainment","name":"Kultura i rozrywka","alias":"kultura-i-rozrywka","id":"38d588fd-7e9c-4c42-a4ae-6831775eca45","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fkultura-i-rozrywka"},{"code":"fashion.beauty","name":"Moda","alias":"moda","id":"ea5b98dd-4b6f-4bd0-8c80-22c2629132d0","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fmoda"},{"code":"automotive","name":"Motoryzacja","alias":"motoryzacja","id":"3","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fmotoryzacja"},{"code":"real.estate","name":"Nieruchomości","alias":"nieruchomosci","id":"20782","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fnieruchomosci"},{"code":"sports.leisure","name":"Sport i turystyka","alias":"sport-i-turystyka","id":"3919","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fsport-i-turystyka"},{"code":"supermarket","name":"Supermarket","alias":"supermarket","id":"258832","type":"DEPARTMENT","url":"\u002Fkategoria\u002Fsupermarket"},{"code":"beauty","name":"Uroda","alias":"uroda","id":"1429","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Furoda"},{"code":"health","name":"Zdrowie","alias":"zdrowie","id":"121882","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fzdrowie"},{"name":"Cele charytatywne","url":"\u002Fcharytatywni\u002Fcele","type":"CHARITY_GOALS"},{"name":"Organizacje charytatywne","url":"\u002Fcharytatywni\u002Forganizacje","type":"CHARITY_ORGANIZATIONS"},{"name":"Sprzedawcy","url":"\u002Fuzytkownik","type":"USERS"},{"name":"Zakończone","url":"\u002Fzakonczone","type":"ENDED"}],"selected":0},"inputPhrase":"","staticQueryParameters":[]}`; newJsonProps.setAttribute('id', 'jsonProps'); newJsonProps.setAttribute('data-serialize-box-id', 'h4GzErVDTJybCQTEmPd4NA==zykHJMKuSo2epoLszF6BoA=='); newJsonProps.setAttribute('type', 'application/json'); jsonProps.parentNode.replaceChild(newJsonProps, jsonProps); jsonProps = newJsonProps; const element = document.querySelector('script[data-serialize-box-id="h4GzErVDTJybCQTEmPd4NA==zykHJMKuSo2epoLszF6BoA=="]'); const data = JSON.parse(element.innerText);
JS
const newJsProps = document.createElement('script'); newJsProps.innerHTML = `window.opbox.boxProperties["h4GzErVDTJybCQTEmPd4NA==zykHJMKuSo2epoLszF6BoA=="] = {"fullscreenVariant":null,"enableSmallSuggestionImages":false,"advancedSearchCriterias":[{"checked":false,"id":"searchInDescriptionChange","label":"szukaj też w opisach ofert","queryParameter":{"value":"1","key":"description"}}],"enableCustomPerformanceMarks":true,"enableFullscreen":false,"enableRewriteSuggestionButton":true,"enableSuggesterHistory":true,"enableSuggestionRemovalButtonOnHover":false,"enableSuggestionsForEmptyPhrase":true,"filters":{"list":[{"name":"Wszystkie kategorie","url":"\u002Flisting","type":"ALL"},{"code":"household","name":"Dom i ogród","alias":"dom-i-ogrod","id":"5","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fdom-i-ogrod"},{"code":"baby","name":"Dziecko","alias":"dziecko","id":"11763","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fdziecko"},{"code":"electronics","name":"Elektronika","alias":"elektronika","id":"42540aec-367a-4e5e-b411-17c09b08e41f","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Felektronika"},{"code":"company","name":"Firma i usługi","alias":"firma","id":"4bd97d96-f0ff-46cb-a52c-2992bd972bb1","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Ffirma"},{"code":"collections.art","name":"Kolekcje i sztuka","alias":"kolekcje-i-sztuka","id":"a408e75a-cede-4587-8526-54e9be600d9f","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fkolekcje-i-sztuka"},{"code":"culture.entertainment","name":"Kultura i rozrywka","alias":"kultura-i-rozrywka","id":"38d588fd-7e9c-4c42-a4ae-6831775eca45","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fkultura-i-rozrywka"},{"code":"fashion.beauty","name":"Moda","alias":"moda","id":"ea5b98dd-4b6f-4bd0-8c80-22c2629132d0","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fmoda"},{"code":"automotive","name":"Motoryzacja","alias":"motoryzacja","id":"3","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fmotoryzacja"},{"code":"real.estate","name":"Nieruchomości","alias":"nieruchomosci","id":"20782","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fnieruchomosci"},{"code":"sports.leisure","name":"Sport i turystyka","alias":"sport-i-turystyka","id":"3919","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fsport-i-turystyka"},{"code":"supermarket","name":"Supermarket","alias":"supermarket","id":"258832","type":"DEPARTMENT","url":"\u002Fkategoria\u002Fsupermarket"},{"code":"beauty","name":"Uroda","alias":"uroda","id":"1429","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Furoda"},{"code":"health","name":"Zdrowie","alias":"zdrowie","id":"121882","leaf":false,"type":"DEPARTMENT","url":"\u002Fkategoria\u002Fzdrowie"},{"name":"Cele charytatywne","url":"\u002Fcharytatywni\u002Fcele","type":"CHARITY_GOALS"},{"name":"Organizacje charytatywne","url":"\u002Fcharytatywni\u002Forganizacje","type":"CHARITY_ORGANIZATIONS"},{"name":"Sprzedawcy","url":"\u002Fuzytkownik","type":"USERS"},{"name":"Zakończone","url":"\u002Fzakonczone","type":"ENDED"}],"selected":0},"inputPhrase":"","staticQueryParameters":[]}`; newJsProps.setAttribute('id', 'jsProps'); newJsProps.setAttribute('data-serialize-box-id', 'h4GzErVDTJybCQTEmPd4NA==zykHJMKuSo2epoLszF6BoA=='); newJsProps.setAttribute('type', 'text/javascript'); jsProps.parentNode.replaceChild(newJsProps, jsProps); jsProps = newJsProps;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
JSON
JS
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
It appears that we have two separate pieces of data here. The first one is a JSON object that represents a JavaScript property set: ``` { "inputPhrase": "", "staticQueryParameters": [], "selected": 0, "data-serialize-box-id": "h4GzErVDTJybCQTEmPd4NA==zykHJMKuSo2epoLszF6BoA==", "type": "text/javascript", "id": "jsProps" } ``` And the second one is a JSON array with two objects, representing benchmarking results: ``` [ { "RawUAString": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0", "Browser": "Firefox 115", "DevicePlatform": "Desktop", "OperatingSystem": "Mac OS X 10.15", "ExecutionsPerSecond": 32827.7109375, "TestName": "JSON" }, { "RawUAString": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0", "Browser": "Firefox 115", "DevicePlatform": "Desktop", "OperatingSystem": "Mac OS X 10.15", "ExecutionsPerSecond": 10686.1318359375, "TestName": "JS" } ] ``` To answer the question, I'll need to know which data set is relevant to the task at hand. However, based on the context of the `data-serialize-box-id` attribute being used in a JavaScript property set, it appears that the second data set might be more relevant. Can you please provide more context or information about what you would like to achieve with these data sets?
Related benchmarks:
Lodash.isEqual 4.17.15 vs JSON.stringify Equality
Lodash.isEqual vs JSON.stringify vs direct comparision of two elements
JSON vs JS
Lodash isEquals vs. JSON Stringify
Comments
Confirm delete:
Do you really want to delete benchmark?