empty vs html vs innerHtmlFastest: innerHtml (3.7x faster)
6,781,123 ops/sec
2,986,316 ops/sec
1,846,792 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| empty | |
| html | |
| innerHtml |
| Test name | Executions per second |
|---|---|
| ✓ innerHtml | 46,680,664 Ops/sec |
| empty | 11,190,516 Ops/sec |
| html | 5,346,480 Ops/sec |