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');
  • new text

     
    a.appendChild(new Text('text'));
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    createTextNode
    textContent
    innerText
    append
    new text

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 9 days ago)
Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0
Firefox 137 on Linux
View result in a separate tab
Test name Executions per second
createTextNode 2633878.0 Ops/sec
textContent 4010845.0 Ops/sec
innerText 2354223.8 Ops/sec
append 4411581.0 Ops/sec
new text 3411447.5 Ops/sec