Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
textContent vs innerHTML vs innerText
textContent vs innerHTML vs innerText test case
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:131.0) Gecko/20100101 Firefox/131.0
Browser:
Firefox 131
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
innerText
450548.2 Ops/sec
innerHtml
502365.9 Ops/sec
textContent
531780.3 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!"