Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
Chrome 89
Linux
Desktop
3 years ago
Test name Executions per second
Remove firstChild 1681905.8 Ops/sec
Remove lastChild 1720584.4 Ops/sec
innerHTML 1441086.1 Ops/sec
innerText 1389222.1 Ops/sec
textContent 1806679.5 Ops/sec
firstChild.remove 2132859.2 Ops/sec
range 612135.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range