Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15
Safari 13
Linux
Desktop
4 years ago
Test name Executions per second
innerHTML 158907.1 Ops/sec
removeChild (checking and removing firstChild) 1304366.5 Ops/sec
removeChild (calling hasChildNodes and removing lastChild) 1298992.6 Ops/sec
removeChild (checking and removing lastChild) 1278566.2 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)