Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36
Chrome 94
Windows
Desktop
2 years ago
Test name Executions per second
Remove firstChild 4715769.5 Ops/sec
Remove lastChild 4746836.0 Ops/sec
innerHTML 3652382.0 Ops/sec
innerText 2656973.5 Ops/sec
textContent 3267026.5 Ops/sec
firstChild.remove 4748660.5 Ops/sec
range 1032517.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range