As a general rule, I'm trying to determine which is faster:
1) $('tag.class')
or
2) $('.class')
where the style class '.class' only appears on a specific tag type.
A simple test yields the following results (
http://jsperf.com/foobar98755), but they appear to vary wildly by browser. I was hoping for a more consistent result, but IE and Opera appear to run better when the tag is specified, yet doing so significantly slows down Chrome and FF.
Short of expanding the API to include some new, optional tag name selector, is there anything that can be done about this?