Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36
Chrome 91
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
innerHTML += (remove) 371.6 Ops/sec
innerHTML += (display none) 166.7 Ops/sec
appendChild 2751629.2 Ops/sec
insertAdjacentElement 2675026.2 Ops/sec
insertAdjacentHTML (remove) 327945.1 Ops/sec
insertAdjacentHTML ( display none ) 274310.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • innerHTML += (remove)

  • innerHTML += (display none)

  • appendChild

  • insertAdjacentElement

  • insertAdjacentHTML (remove)

  • insertAdjacentHTML ( display none )