Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
createTextNode vs textContent vs innerText vs append vs new Text
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser:
Chrome 134
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
textContent
14.8M/s
append
4.3M/s
innerText
4.1M/s
new text
4.0M/s
createTextNode
3.6M/s
View exact numbers
Test name
Executions per second
✓
textContent
14,808,525 Ops/sec
append
4,262,410 Ops/sec
innerText
4,133,122 Ops/sec
new text
4,040,261 Ops/sec
createTextNode
3,615,097 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';
append
a.append('text');
new text
a.appendChild(new Text('text'));