Hacker News new | ask | show | jobs
by pfisch 6251 days ago
This is not really accurate information. The methodology is poor compared to other selector tests, and the results are less accurate and less specific. Selector optimization changes based upon the browser. The slowest browsers(ie6) actually select faster with $(tagname.classname) and other more specific selectors. Of course he didn't mention which browsers he tested in or which version of jquery or if it was an average of many runs.

In anycase it is probably more worthwhile to optimize for the slowest browsers that you want to be compatible with, and those browsers are not firefox unless you don't care about like half of the people on the internet.

edit - just to clarify, based upon his results I'm guessing he's only using firefox to run these tests.

2 comments

(I think the author of the blog post was a "she")

Do you have some links to other selector optimization tests/benchmarks/posts? I'd be interested in seeing those as well

It doesn't feel like an overly comprehensive test to me either. He also doesn't mention how many test cycles he's running, browser versions, etc.