Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36
Chrome 94
Windows 7
Desktop
3 years ago
Test name Executions per second
innerHTML += (remove) 162.2 Ops/sec
innerHTML += (display none) 72.2 Ops/sec
appendChild 1119076.2 Ops/sec
insertAdjacentElement 970610.9 Ops/sec
insertAdjacentHTML (remove) 76323.1 Ops/sec
insertAdjacentHTML ( display none ) 61414.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • innerHTML += (remove)

  • innerHTML += (display none)

  • appendChild

  • insertAdjacentElement

  • insertAdjacentHTML (remove)

  • insertAdjacentHTML ( display none )