Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Linux
Desktop
one year ago
set textContent
5.4M/s
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
HTML Preparation code:
Script Preparation code:
Tests: