Test case name | Result |
---|---|
getElementsById + getElementsByClassName | |
querySelector + querySelector | |
querySelector | |
cache + getElementsByClassName | |
cache + querySelector |
Test name | Executions per second |
---|---|
getElementsById + getElementsByClassName | 2167442.8 Ops/sec |
querySelector + querySelector | 1372145.2 Ops/sec |
querySelector | 1909224.9 Ops/sec |
cache + getElementsByClassName | 2477965.5 Ops/sec |
cache + querySelector | 2492925.0 Ops/sec |