Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106
Linux
Desktop
2 years ago
Test name Executions per second
Remove firstChild 3158286.8 Ops/sec
Remove lastChild 3064978.5 Ops/sec
innerHTML 2654011.5 Ops/sec
innerText 1873504.9 Ops/sec
textContent 2148932.8 Ops/sec
firstChild.remove 3317486.0 Ops/sec
range 625499.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range