Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
textContent vs dataset
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Browser:
Chrome 121
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
textContent
191408.3 Ops/sec
dataset
179977.7 Ops/sec
HTML Preparation code:
<div id="app" data-page="{"component":"dashboard","props":[],"url":"http:\/\/127.0.0.1:8000","version":null}"></div> <script id="knep">"{"component":"dashboard","props":[],"url":"http:\/\/127.0.0.1:8000","version":null}"</script>
Tests:
textContent
const page = JSON.parse(document.getElementById('knep').textContent); console.log(page);
dataset
const page = JSON.parse(document.getElementById('app').dataset.page); console.log(page);