Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
textContent vs nodeValue vs data vs innerText
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser:
Chrome 133
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
node.data
907K/s
node.textContent
906K/s
node.nodeValue
887K/s
element.textContent
762K/s
innerText
691K/s
View exact numbers
Test name
Executions per second
✓
node.data
907,051 Ops/sec
node.textContent
906,102 Ops/sec
node.nodeValue
887,409 Ops/sec
element.textContent
762,211 Ops/sec
innerText
691,333 Ops/sec
HTML Preparation code:
<div id="el"> </div>
Script Preparation code:
var a = document.querySelector('#el');
Tests:
element.textContent
a.textContent = Math.random();
node.textContent
a.firstChild.textContent = Math.random();
node.nodeValue
a.firstChild.nodeValue = Math.random();
node.data
a.firstChild.data = Math.random();
innerText
a.innerText = Math.random();