Script Preparation code:
Tests:

Historical Performance Data aggregated from 10 community runs

Desktop Results:
Chrome 10 runs
one by one manual
610/s
replaceWith first (firstChild)
554/s
replaceChildren mass
547/s

Fastest: one by one manual (1.1x faster)

View exact numbers
  • one by one manual: 610 ops/sec
  • replaceWith first (firstChild): 554 ops/sec
  • replaceChildren mass: 547 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
    one by one manual
    replaceChildren mass
    replaceWith first (firstChild)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 11 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15
Safari 18 on Mac OS X 10.15.7
View result in a separate tab
one by one manual
982/s
replaceChildren mass
843/s
replaceWith first (firstChild)
796/s
View exact numbers
Test name Executions per second
one by one manual 982 Ops/sec
replaceChildren mass 843 Ops/sec
replaceWith first (firstChild) 796 Ops/sec