Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
Chrome 90
Windows 7
Desktop
3 years ago
Test name Executions per second
innerHTML += (remove) 87.2 Ops/sec
innerHTML += (display none) 43.6 Ops/sec
appendChild 214074.6 Ops/sec
insertAdjacentElement 149983.6 Ops/sec
insertAdjacentHTML (remove) 17504.8 Ops/sec
insertAdjacentHTML ( display none ) 17483.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • innerHTML += (remove)

  • innerHTML += (display none)

  • appendChild

  • insertAdjacentElement

  • insertAdjacentHTML (remove)

  • insertAdjacentHTML ( display none )