HTML Preparation code:
Script Preparation code:
Tests:
  • Html String (append)

  • html string (innerHTML)

  • virtual node function

  • Clone cached vnode

  • vparent (append)

  • vparent (innerHTML)

  • vparent appendChild

  • vparent cloneNode

  • Control run coz i dont believe that innerHTML is slower.

  • template string function

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Html String (append)
    html string (innerHTML)
    virtual node function
    Clone cached vnode
    vparent (append)
    vparent (innerHTML)
    vparent appendChild
    vparent cloneNode
    Control run coz i dont believe that innerHTML is slower.
    template string function

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Chrome 91 on Linux
View result in a separate tab
Test name Executions per second
Html String (append) 914854.6 Ops/sec
html string (innerHTML) 20763.4 Ops/sec
virtual node function 7160.7 Ops/sec
Clone cached vnode 140363.8 Ops/sec
vparent (append) 924872.0 Ops/sec
vparent (innerHTML) 20157.4 Ops/sec
vparent appendChild 7401.2 Ops/sec
vparent cloneNode 200618.2 Ops/sec
Control run coz i dont believe that innerHTML is slower. 669110.2 Ops/sec