Skip to content

Comment on Demystifying jQuery selector optimization

Comments

I don't know if it helps, but I talked to John Resig last Friday night after day 1 of JSConf2009. I specifically was asking about how Sizzle works when selecting. The jist of it is that Sizzle selects the maximum number of possible elements, then pairs them down until it finds the ones you are looking for. I haven't dugg back into the Sizzle code yet to really see how this is being done, but it might help others who are curious.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.