insertAdjacentHTML-vs-innerHTML (v6)

Revision 6 of this benchmark created on


Preparation HTML

<div id="counter">
</div>

Teardown


    document.getElementById("counter").innerHTML = "";
  

Test runner

Ready to run.

Testing in
TestOps/sec
insertAdjacentHTML
document.getElementById("counter").insertAdjacentHTML('beforeend', '<span>hello</span>');
ready
innerHTML
document.getElementById("counter").innerHTML = '<span>hello</span>';
ready

Revisions

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