Run details:
Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Chrome OS 14541.0.0
Desktop
one year ago
Test name Executions per second
set same value via textContent 6775336.5 Ops/sec
set same value via innerText 1737884.8 Ops/sec
set different value via textContext 6572991.5 Ops/sec
set different value via innerText 1731097.6 Ops/sec
set same value if changed via textContent 7485101.0 Ops/sec
set same value if changed via innerText 1107991.6 Ops/sec
set different value if changed via textContent 7739438.5 Ops/sec
set different value if changed via innerText 1029156.1 Ops/sec
set same value via nodeValue 4942868.5 Ops/sec
set different value via nodeValue 3845782.2 Ops/sec
set same value if changed via nodeValue 10595588.0 Ops/sec
set different value if changed via nodeValue 10500733.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • set same value via textContent

  • set same value via innerText

  • set different value via textContext

  • set different value via innerText

  • set same value if changed via textContent

  • set same value if changed via innerText

  • set different value if changed via textContent

  • set different value if changed via innerText

  • set same value via nodeValue

  • set different value via nodeValue

  • set same value if changed via nodeValue

  • set different value if changed via nodeValue


;