Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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:
5 months ago
Benchmark engine:
Benchmark.js
JSON
1.5M/s
XML
143K/s
View exact numbers
Test name
Executions per second
✓
JSON
1,541,319 Ops/sec
XML
143,095 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]