Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
textContent vs nodeValue vs data
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 11; Infinix X6511B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.154 Mobile Safari/537.36 OPR/78.5.4143.75924
Browser:
Opera Mobile 78
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
node.data
85K/s
node.nodeValue
84K/s
node.textContent
83K/s
element.textContent
70K/s
View exact numbers
Test name
Executions per second
✓
node.data
84,662 Ops/sec
node.nodeValue
84,166 Ops/sec
node.textContent
82,530 Ops/sec
element.textContent
69,895 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();