Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
innerText vs. textContent writing
testing writing an elements text with innerText vs. textContent
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/126.0.0.0 Safari/537.36
Browser:
Chrome 126
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
innerText
534310.6 Ops/sec
textContent
1718169.8 Ops/sec
HTML Preparation code:
<style> .headline { width: 100%; color: #c0ffee; font-family: Helvetica, Arial, sans-serif; font-size: 2rem; font-width: 700; line-height: 1.5; text-align: center; } </style> <h1 id="testSubject" class="headline">this is a test</h1>
Script Preparation code:
const testSubject = document.getElementById("#testSubject");
Tests:
innerText
testSubject.innerText = "that is another test";
textContent
testSubject.textContent = "that is another test";