HTML Preparation code:
x
 
1
2
<div id='hello'>Hello, World!</div>
Script Preparation code:
 
let el = document.querySelector("#hello");
Tests:
  • textContent

     
    let i = 1000;
    let el = document.querySelector("#hello");
    while (i--) {
        el.textContent = "Goodbye, cruel world!"
    }
  • innerHtml

     
    let i = 1000;
    let el = document.querySelector("#hello");
    while (i--) {
        el.innerHtml = "Goodbye, cruel world!"
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    textContent
    innerHtml

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1
Mobile Safari 15 on iOS 15.5
View result in a separate tab
Test name Executions per second
textContent 12112.8 Ops/sec
innerHtml 1272247.5 Ops/sec