Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106
Windows
Desktop
2 years ago
Test name Executions per second
Remove firstChild 2825649.2 Ops/sec
Remove lastChild 2790708.5 Ops/sec
innerHTML 1214732.0 Ops/sec
innerText 1438982.6 Ops/sec
textContent 1157737.0 Ops/sec
firstChild.remove 2833567.0 Ops/sec
range 635871.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range