Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36
Chrome 93
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
Remove firstChild 5868861.5 Ops/sec
Remove lastChild 5952065.5 Ops/sec
innerHTML 4515204.0 Ops/sec
innerText 3228231.5 Ops/sec
textContent 3895910.5 Ops/sec
firstChild.remove 5881392.0 Ops/sec
range 1154344.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range