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 5247579.5 Ops/sec
Remove lastChild 4956072.5 Ops/sec
innerHTML 3882106.5 Ops/sec
innerText 2664371.2 Ops/sec
textContent 3479374.8 Ops/sec
firstChild.remove 4930340.5 Ops/sec
range 1030271.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range