Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Chrome 102
Windows
Desktop
2 years ago
Test name Executions per second
Remove firstChild 3793603.2 Ops/sec
Remove lastChild 1418317.1 Ops/sec
innerHTML 2685819.0 Ops/sec
innerText 1620532.1 Ops/sec
textContent 1791680.9 Ops/sec
firstChild.remove 3228543.2 Ops/sec
range 669512.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range