Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36
Chrome 88
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
Remove firstChild 1361484.0 Ops/sec
Remove lastChild 1341430.5 Ops/sec
innerHTML 1165868.6 Ops/sec
innerText 1137304.5 Ops/sec
textContent 1212209.4 Ops/sec
firstChild.remove 1274874.4 Ops/sec
range 541495.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Remove firstChild

  • Remove lastChild

  • innerHTML

  • innerText

  • textContent

  • firstChild.remove

  • range