Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
createTextNode vs textContent vs innerText vs nodeValue
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0
Browser:
Firefox 141
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
nodeValue
45.9M/s
textContent
3.5M/s
createTextNode
2.3M/s
innerText
1.9M/s
View exact numbers
Test name
Executions per second
✓
nodeValue
45,938,560 Ops/sec
textContent
3,538,315 Ops/sec
createTextNode
2,269,139 Ops/sec
innerText
1,906,250 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';
nodeValue
a.nodeValue = 'text';