Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0
Firefox 102
Windows
Desktop
2 months ago
Test name Executions per second
Remove firstChild 4490474.5 Ops/sec
Remove lastChild 4505048.5 Ops/sec
innerHTML 3487612.0 Ops/sec
innerText 3351653.8 Ops/sec
textContent 3628903.5 Ops/sec
firstChild.remove 4455014.0 Ops/sec
range 920179.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range