Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
Chrome 97
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
innerHTML += (remove) 352.9 Ops/sec
innerHTML += (display none) 155.5 Ops/sec
appendChild 2520642.2 Ops/sec
insertAdjacentElement 2455200.0 Ops/sec
insertAdjacentHTML (remove) 312381.3 Ops/sec
insertAdjacentHTML ( display none ) 259881.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • innerHTML += (remove)

  • innerHTML += (display none)

  • appendChild

  • insertAdjacentElement

  • insertAdjacentHTML (remove)

  • insertAdjacentHTML ( display none )