Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0
Firefox 97
Windows
Desktop
2 years ago
Test name Executions per second
Remove firstChild 2642921.2 Ops/sec
Remove lastChild 2731323.5 Ops/sec
innerHTML 2231609.2 Ops/sec
innerText 2098537.2 Ops/sec
textContent 1984134.5 Ops/sec
firstChild.remove 2584309.0 Ops/sec
range 772654.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range