Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Chrome 132
Mac OS X 10.15.7
Desktop
23 days ago
Test name Executions per second
createTextNode 4083971.5 Ops/sec
textContent 4715795.5 Ops/sec
innerText 1384888.8 Ops/sec
append 1433061.4 Ops/sec
Script Preparation code:
AخA
 
var a = document.createElement('a');
Tests:
  • createTextNode

     
    a.appendChild(document.createTextNode('text'));
  • textContent

     
    a.textContent = 'text';
  • innerText

     
    a.innerText = 'text';
  • append

     
    a.append('text');