innerHTML vs removeChild (v34)

Revision 34 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div id="box"><p>sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g<b>s f</b>s df</p><p>df gsdfg sf g</p></div>
<script>
  var box = document.getElementById("box")
  var backup = box.cloneNode(true)
</script>

Setup

var $box = $(box)

Teardown



            box = backup.cloneNode(true)
        
  

Test runner

Ready to run.

Testing in
TestOps/sec
removeChild
while (box.hasChildren) {
  box.removeChild(box.firstChild)
}
ready
empty
$box.empty()
ready

Revisions

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