Test name | Executions per second |
---|---|
append | 479331.4 Ops/sec |
appendChild | 570250.2 Ops/sec |
<div id="container"></div>
var container = document.getElementById("container");
var paragraph = document.createElement("p");
var paragraph1 = document.createElement("p");
var paragraph2 = document.createElement("p");
var paragraph3 = document.createElement("p");
container.append(paragraph,paragraph1,paragraph2,paragraph3);
container.appendChild(paragraph);
container.appendChild(paragraph1);
container.appendChild(paragraph2);
container.appendChild(paragraph3);