Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36
Chrome 98
Windows
Desktop
2 years ago
Test name Executions per second
Remove firstChild 7324341.5 Ops/sec
Remove lastChild 7404782.5 Ops/sec
innerHTML 2220575.5 Ops/sec
innerText 3632362.5 Ops/sec
textContent 1930956.4 Ops/sec
firstChild.remove 7379584.5 Ops/sec
range 1395801.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range