HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 80 community runs

Desktop Results:
Chrome 56 runs
appendChild
2.0M/s
insertBefore
2.0M/s
insertAdjacentElement
1.9M/s
prepend
1.8M/s

Fastest: appendChild (1.2x faster)

View exact numbers
  • appendChild: 2,035,246 ops/sec
  • insertBefore: 2,026,518 ops/sec
  • insertAdjacentElement: 1,851,382 ops/sec
  • prepend: 1,759,052 ops/sec
Firefox 17 runs
appendChild
23K/s
insertAdjacentElement
20K/s
insertBefore
19K/s
prepend
16K/s

Fastest: appendChild (1.4x faster)

View exact numbers
  • appendChild: 22,768 ops/sec
  • insertAdjacentElement: 19,942 ops/sec
  • insertBefore: 19,108 ops/sec
  • prepend: 15,744 ops/sec
Safari 7 runs
appendChild
4.1M/s
insertBefore
4.0M/s
insertAdjacentElement
4.0M/s
prepend
3.7M/s

Fastest: appendChild (1.1x faster)

View exact numbers
  • appendChild: 4,118,536 ops/sec
  • insertBefore: 4,038,958 ops/sec
  • insertAdjacentElement: 3,974,502 ops/sec
  • prepend: 3,740,958 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    insertBefore
    appendChild
    prepend
    insertAdjacentElement

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36 Edg/148.0.0.0
Chrome 148 on Windows
View result in a separate tab
appendChild
1.2M/s
insertBefore
737K/s
prepend
312K/s
insertAdjacentElement
210K/s
View exact numbers
Test name Executions per second
appendChild 1,170,184 Ops/sec
insertBefore 736,837 Ops/sec
prepend 312,196 Ops/sec
insertAdjacentElement 210,410 Ops/sec