Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Remove firstChild 4066199.0 Ops/sec
Remove lastChild 4016622.5 Ops/sec
innerHTML 1992837.4 Ops/sec
innerText 2481515.0 Ops/sec
textContent 1819291.1 Ops/sec
firstChild.remove 3945577.0 Ops/sec
range 918537.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range