Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0
Firefox 95
Mac OS X 10.15
Desktop
3 years ago
Test name Executions per second
innerHTML 1533251.6 Ops/sec
replaceChildren 1192802.4 Ops/sec
remove firstChild 1643188.9 Ops/sec
remove lastChild 1648092.0 Ops/sec
textContent 1516394.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • innerHTML

  • replaceChildren

  • remove firstChild

  • remove lastChild

  • textContent

  • remove and recreate root element