Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Reading textContent vs innerText vs innerHTML
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0
Browser:
Firefox 147
Operating system:
Windows
Device Platform:
Desktop
Date tested:
3 months ago
Test name
Executions per second
textContent
1394835.8 Ops/sec
innerText
2987.8 Ops/sec
innerHTML
1188129.1 Ops/sec
HTML Preparation code:
<div id='hello'>Hello, World!</div>
Script Preparation code:
let el = document.querySelector("#hello");
Tests:
textContent
let i = 1000, tmp = ''; while (i--) tmp = el.textContent;
innerText
let i = 1000, tmp = ''; while (i--) tmp = el.innerText;
innerHTML
let i = 1000, tmp = ''; while (i--) tmp = el.innerHTML;