Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Chrome 103
Windows
Desktop
2 years ago
Test name Executions per second
Remove firstChild 4280334.0 Ops/sec
Remove lastChild 4318507.5 Ops/sec
innerHTML 3579966.2 Ops/sec
innerText 2727815.2 Ops/sec
textContent 3256600.5 Ops/sec
firstChild.remove 4284711.0 Ops/sec
range 1093228.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range