Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
Chrome 86
Mac OS X 10.14.6
Desktop
4 years ago
Test name Executions per second
Remove firstChild 3326938.0 Ops/sec
Remove lastChild 3341699.5 Ops/sec
innerHTML 2616033.8 Ops/sec
innerText 2159266.8 Ops/sec
textContent 2691066.2 Ops/sec
firstChild.remove 3306892.5 Ops/sec
range 516223.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range