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 3172691.2 Ops/sec
Remove lastChild 3260029.8 Ops/sec
innerHTML 2588705.8 Ops/sec
innerText 2000385.1 Ops/sec
textContent 2592015.5 Ops/sec
firstChild.remove 3253506.0 Ops/sec
range 695614.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range