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 7283222.5 Ops/sec
Remove lastChild 7449757.0 Ops/sec
innerHTML 3462362.8 Ops/sec
innerText 4089724.2 Ops/sec
textContent 2804974.5 Ops/sec
firstChild.remove 6891633.5 Ops/sec
range 1670077.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range