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
Test name
Executions per second
innerHTML
409493.6 Ops/sec
innerText
631577.2 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';