replaceWith vs innerHTMLFastest: innerHTML (1.2x faster)
214,117 ops/sec
174,425 ops/sec
Fastest: innerHTML (1.3x faster)
35,078 ops/sec
27,911 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| replaceWith | |
| innerHTML |
| Test name | Executions per second |
|---|---|
| ✓ innerHTML | 214,117 Ops/sec |
| replaceWith | 189,441 Ops/sec |