Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
xml vs json
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:149.0) Gecko/20100101 Firefox/149.0
Browser:
Firefox 149
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one month ago
Test name
Executions per second
XML
143095.0 Ops/sec
JSON
1541319.4 Ops/sec
Tests:
XML
const html = "<html><body><div>test</div></body></html>" const parser = new DOMParser(); const virtualDom = parser.parseFromString(html, 'text/html'); const body = virtualDom.querySelector('body');
JSON
const html = ` { "type": "element", "name": "html", "children": [ { "type": "element", "name": "body", "children": [ { "type": "element", "name": "div", "children": [ { "type": "text", "value": "test" } ] } ] } ] } `; const parsed = JSON.parse(html); const body = parsed.children[0]