Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
innerHTML vs textContent vs innerText
innerHTML vs textContent vs innerText test case
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0
Browser:
Firefox 52
Operating system:
Windows XP
Device Platform:
Desktop
Date tested:
one year ago
innerHtml
118.5M/s
textContent
589K/s
innerText
323K/s
View exact numbers
Test name
Executions per second
✓
innerHtml
118,514,424 Ops/sec
textContent
589,061 Ops/sec
innerText
322,556 Ops/sec
HTML Preparation code:
<div id='hello'>Hello, World!</div>
Script Preparation code:
var el = document.getElementById('hello');
Tests:
innerText
el.innerText = "Goodbye, cruel world!"
innerHtml
el.innerHtml = "Goodbye, cruel world!"
textContent
el.textContent = "Goodbye, cruel world!"