Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
createTextNode vs textContent vs innerText vs innerHTML
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 122
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
createTextNode
696380.2 Ops/sec
textContent
2742700.8 Ops/sec
innerText
1138147.4 Ops/sec
innerHTML
549486.0 Ops/sec
Script Preparation code:
var a = document.createElement('a');
Tests:
createTextNode
a.appendChild(document.createTextNode('text'));
textContent
a.textContent = 'text';
innerText
a.innerText = 'text';
innerHTML
a.innerHTML = 'text';