Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
innerText vs innerHTML (performance 3)
This benchmark is to compare the performance of innerText vs innerHTML when binding text to the DOM.
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/127.0.0.0 Safari/537.36
Browser:
Chrome 127
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
innerText
632K/s
innerHTML
409K/s
View exact numbers
Test name
Executions per second
✓
innerText
631,577 Ops/sec
innerHTML
409,494 Ops/sec
HTML Preparation code:
<div id='container'></div>
Script Preparation code:
const container = document.querySelector('#container');
Tests:
innerHTML
container.innerHTML = 'This is a text to compare innerText and innerHTML';
innerText
container.innerText = 'This is a text to compare innerText and innerHTML';