Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
textContent vs dataset vs innerText
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0
Browser:
Firefox 141
Operating system:
Linux
Device Platform:
Desktop
Date tested:
10 months ago
dataset
1.2M/s
textContent
518K/s
innerText
407K/s
View exact numbers
Test name
Executions per second
✓
dataset
1,152,221 Ops/sec
textContent
518,145 Ops/sec
innerText
406,508 Ops/sec
HTML Preparation code:
<div id="el"data-value=""> </div>
Script Preparation code:
var a = document.querySelector('#el');
Tests:
textContent
a.textContent = Math.random();
dataset
a.dataset.value = Math.random();
innerText
a.innerText = Math.random();