I donβt even remember to ask this question at the moment, but here's jist:
The difference in performance is a minute, EXCEPT when using a JS library such as jQuery. To evaluate $ ('. Class'), jQuery checks all the elements in the DOM. To evaluate $ ('div.class'), it only checks divs. Therefore, depending on the size of the DOM and the elements in it, the performance difference can be quite significant.
So, the pure CSS performance is almost the same, but the performance at startup, although the Javascript selection mechanism may be noticeably different. I think this is what I aspired to when I asked about it. Thank you all for your comments, you all get upvotes :)
source share