Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
append 3604833.2 Ops/sec
appendChild 3896227.2 Ops/sec
HTML Preparation code:
AخA
 
1
<div id="container"></div>
Script Preparation code:
 
var container = document.getElementById("container");
var paragraph = document.createElement("p");
Tests:
  • append

     
    container.append(paragraph);
  • appendChild

     
    container.appendChild(paragraph);