Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0
Firefox 117
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
.createElement() + .innerHTML 1026855616.0 Ops/sec
.createHTMLDocument() + .innerHTML 1030837440.0 Ops/sec
DOMParser 1026392192.0 Ops/sec
Nested .createElement() + .appendChild() 1030867968.0 Ops/sec
Script Preparation code:
Tests:
  • .createElement() + .innerHTML

  • .createHTMLDocument() + .innerHTML

  • DOMParser

  • Nested .createElement() + .appendChild()