Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0
Chrome 126
Windows
Desktop
5 months ago
Test name Executions per second
Remove firstChild 7040739.0 Ops/sec
Remove lastChild 6985321.0 Ops/sec
innerHTML 2740864.0 Ops/sec
innerText 3719869.0 Ops/sec
textContent 2461764.8 Ops/sec
firstChild.remove 7392353.5 Ops/sec
range 1584584.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range