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
Test name
Executions per second
element.textContent
69895.4 Ops/sec
node.textContent
82529.7 Ops/sec
node.nodeValue
84166.3 Ops/sec
node.data
84661.9 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();