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/128.0.0.0 Safari/537.36
Browser:
Chrome 128
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
textContent
6.7M/s
append
3.9M/s
innerText
2.9M/s
createTextNode
1.7M/s
new text
1.7M/s
View exact numbers
Test name
Executions per second
✓
textContent
6,730,486 Ops/sec
append
3,877,092 Ops/sec
innerText
2,880,550 Ops/sec
createTextNode
1,747,604 Ops/sec
new text
1,677,529 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'));