Tests:
-
set textContent
-
cached textContent prototype
-
avoid remove the existing node and create a new one
Rendered benchmark preparation results:
Latest run results:
Run details: (Test run date:
one year ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130 on Linux
View result in a separate tab
cached textContent prototype
3.8M/s
avoid remove the existing node and create a new one
1.9M/s
View exact numbers
| Test name |
Executions per second |
|
✓
set textContent
|
5,388,248 Ops/sec |
|
cached textContent prototype
|
3,767,642 Ops/sec |
|
avoid remove the existing node and create a new one
|
1,926,092 Ops/sec |
Do you really want to delete benchmark?