Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0
Firefox 99
Windows
Desktop
2 years ago
Test name Executions per second
Remove firstChild 4682546.0 Ops/sec
Remove lastChild 4683425.5 Ops/sec
innerHTML 3891849.0 Ops/sec
innerText 3716107.5 Ops/sec
textContent 3829295.0 Ops/sec
firstChild.remove 4714021.0 Ops/sec
range 828810.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range