.innerHTML vs textContent vs value (v2)

Revision 2 of this benchmark created on


Preparation HTML

<div id="innerHTML"></div>
<div id="textContent"></div>
<input type="text" size="30" id="value" />

Test runner

Ready to run.

Testing in
TestOps/sec
innerHTML
document.getElementById("innerHTML").innerHTML += 123456789;
ready
textContent
document.getElementById("textContent").textContent += 123456789;
ready
value
document.getElementById("value").value += 123456879;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.