Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
innerText vs innerHTML vs textContent
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Browser:
Chrome 142
Operating system:
Linux
Device Platform:
Desktop
Date tested:
10 months ago
Benchmark engine:
Benchmark.js
innerHTML
1.3M/s
innerText
1.2M/s
textContent
431K/s
View exact numbers
Test name
Executions per second
✓
innerHTML
1,265,011 Ops/sec
innerText
1,203,725 Ops/sec
textContent
431,406 Ops/sec
HTML Preparation code:
<div id="A">12345<div>
Script Preparation code:
var X = 0;
Tests:
innerText
A.innerText = ++X;
innerHTML
A.innerHTML = ++X;
textContent
A.textContent = ++X;