innerHTML vs. W3C DOM Partial change (v3)

Revision 3 of this benchmark created on


Preparation HTML

<div id="container" style="display:none;">
<span id="test">Some Text</span>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
innerHTML
document.getElementById("test").innerHTML = '<span>Hello World</span>';
ready
W3C DOM
var spanEl = document.getElementById("test");
spanEl.textContent = 'Hello World';
ready

Revisions

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

  • Revision 3: published on
  • Revision 6: published by Eamon Nerbonne on