Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106
Linux
Desktop
2 years ago
Test name Executions per second
Remove firstChild 3144115.2 Ops/sec
Remove lastChild 3216899.8 Ops/sec
innerHTML 2684701.0 Ops/sec
innerText 1942216.4 Ops/sec
textContent 2176839.0 Ops/sec
firstChild.remove 3245108.2 Ops/sec
range 394849.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range