Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Chrome 115
Linux
Desktop
one year ago
Test name Executions per second
innerHTML 1104378.8 Ops/sec
replaceChildren 1022353.7 Ops/sec
remove firstChild 1176666.0 Ops/sec
remove lastChild 1174203.1 Ops/sec
textContent 1044387.6 Ops/sec
remove and recreate root element 252382.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • innerHTML

  • replaceChildren

  • remove firstChild

  • remove lastChild

  • textContent

  • remove and recreate root element