Hi John,

On Mon, Oct 20, 2008 at 15:52, John Resig <[EMAIL PROTECTED]> wrote:
> That's... odd. Are there any selectors that are noticeably faster?

Yes, it seems that nested queries are to blame. By nested queries I
mean queries that uses the axis combinator, either the implicit
"descendant" axis (like "div p") or an explicit axis combinator such
as ~, > or +.

"div ~ p" is 2ms on MK+Sizzle vs. 13ms on Sizzle.
"div p" is 2ms on MK+Sizzle vs. 4ms on Sizzle.
"div > p" is 1ms vs. 3ms
"div + p" is 1ms vs. 5ms
"div p a" is 1ms vs. 8ms

Also, a[href][lang][class] is 1ms vs. 9ms.

> Maybe something is failing?

I don't think so, at least the number of elements returned by each is
the same in every test.

You can run the test benchmark yourself here:
http://www.hvergi.net/arnar/public/sizzle/speed/

cheers,
Arnar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to