Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Chrome 96
Windows
Desktop
2 years ago
Test name Executions per second
Remove firstChild 5404179.0 Ops/sec
Remove lastChild 5338870.5 Ops/sec
innerHTML 4179395.2 Ops/sec
innerText 3058139.5 Ops/sec
textContent 3486321.2 Ops/sec
firstChild.remove 4766464.5 Ops/sec
range 1061434.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range