Tests:
-
getElementById
-
querySelector
-
getElementById and getElementsByClassName
Rendered benchmark preparation results:
Latest run results:
Run details: (Test run date:
2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 OPR/109.0.0.0
Opera 109 on Windows
View result in a separate tab
getElementById and getElementsByClassName
2.2M/s
View exact numbers
| Test name |
Executions per second |
|
✓
getElementById
|
4,348,930 Ops/sec |
|
getElementById and getElementsByClassName
|
2,193,855 Ops/sec |
|
querySelector
|
1,997,115 Ops/sec |
Do you really want to delete benchmark?