|
|
|
|
|
by austincheney
2141 days ago
|
|
I love how big the numbers are in recent versions of Firefox. On my crappy work computer that can barely run Notepad++ I am pulling 1.8 billion ops for getElementById and getElementsByClassName. The performance gaps: * getElementById vs equivalent querySelector is about 1000x. * getElementsByClassName vs querySelectorAll is about 250,000x. * On Chrome getElementsByClassName vs querySelectorAll is only about 426x. This is a micro-benchmark. In the real world that disparity would magnify almost exponentially with the number of nodes in a given page and the frequency and depth of access requests to the DOM. |
|