Tests:
Remove firstChild
Remove lastChild
innerHTML
innerText
textContent
firstChild.remove
range
replaceChildren
Rendered benchmark preparation results:
Latest run results:
Run details: (Test run date:
2 years ago )
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Browser/OS:
Chrome 122 on Mac OS X 10.15.7
View result in a separate tab
Embed
firstChild.remove
10.3M/s
Remove firstChild
10.3M/s
View exact numbers
Test name
Executions per second
✓
firstChild.remove
10,332,918 Ops/sec
Remove firstChild
10,291,701 Ops/sec
Remove lastChild
10,280,178 Ops/sec
innerHTML
8,593,443 Ops/sec
textContent
8,397,485 Ops/sec
replaceChildren
7,788,756 Ops/sec
innerText
7,444,265 Ops/sec
range
2,685,014 Ops/sec
Do you really want to delete benchmark?