replaceWith() vs .outerHTML2,730,815 ops/sec
2,665,770 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| replaceWith() | |
| .outerHTML |
| Test name | Executions per second |
|---|---|
| ✓ .outerHTML | 2,478,108 Ops/sec |
| replaceWith() | 1,988,019 Ops/sec |