Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78
Linux
Desktop
3 years ago
Test name Executions per second
innerHTML 2533363.8 Ops/sec
removeChild (checking and removing firstChild) 3314375.0 Ops/sec
removeChild (calling hasChildNodes and removing lastChild) 3289887.5 Ops/sec
removeChild (checking and removing lastChild) 3271906.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • innerHTML

  • removeChild (checking and removing firstChild)

  • removeChild (calling hasChildNodes and removing lastChild)

  • removeChild (checking and removing lastChild)