innerhtml vs removechild vs remove(my version)

4 years ago
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36
Test name Executions per second
innerHTML 1433984.0 Ops/sec
removeChild 3865580.0 Ops/sec
remove 3806469.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • innerHTML

  • removeChild

  • remove

Open this result on MeasureThat.net