Test case name | Result |
---|---|
getElementById() | |
getElementsByClassName() | |
getElementsByTagName() | |
querySelector(#id) | |
querySelector(.id) | |
querySelectorAll(#id) | |
querySelectorAll(.id) | |
umbrella(#id) | |
umbrella(.id) | |
umbrella(tag#id) | |
umbrella(tag.id) | |
umbrella + getElementById | |
umbrella + getElementsByClassName | |
umbrella + querySelectorAll | |
querySelectorAll in function |
Test name | Executions per second |
---|---|
getElementById() | 1121478.2 Ops/sec |
getElementsByClassName() | 907700.4 Ops/sec |
getElementsByTagName() | 826828.8 Ops/sec |
querySelector(#id) | 683199.5 Ops/sec |
querySelector(.id) | 1299537.5 Ops/sec |
querySelectorAll(#id) | 363322.0 Ops/sec |
querySelectorAll(.id) | 569824.2 Ops/sec |
umbrella(#id) | 144484.6 Ops/sec |
umbrella(.id) | 157129.8 Ops/sec |
umbrella(tag#id) | 140512.9 Ops/sec |
umbrella(tag.id) | 151993.4 Ops/sec |
umbrella + getElementById | 340174.9 Ops/sec |
umbrella + getElementsByClassName | 193390.5 Ops/sec |
umbrella + querySelectorAll | 179337.4 Ops/sec |
querySelectorAll in function | 557181.1 Ops/sec |