Recent Sly / Sizzle / Slick benchmark

25 views
Skip to first unread message

Savageman

unread,
Aug 16, 2010, 1:19:04 PM8/16/10
to MooTools Users
Hello,

My question is in the topic's title. I couldn't find any more recent
benchmark than this one: March 26th, 2009.
http://www.garrickcheung.com/javascript/sly-selector-engine/ which is
now a bit outdated, since newer versions of both MooTools and jQuery
released.

From what I gathered, MooTools 2 will include Slick (yet another
selector engine). It could be good to have this one included as well.

So, what's the status on all of this? Where can I get the intel?

Thanks in advance for your anwsers.

Oskar Krawczyk

unread,
Aug 16, 2010, 2:32:28 PM8/16/10
to mootool...@googlegroups.com
What do you mean "included as well"? Slick has replaced Sly. Sizzle is something that never be a part of MooTools.

Regarding the benchmarks, I've seen one floating around but can't find the link, but the bottom line was this: Sizzle was the fastest.

Wiadomość napisana przez Savageman w dniu 2010-08-16, o godz. 19:19:

Thomas Aylott

unread,
Aug 16, 2010, 3:14:26 PM8/16/10
to mootool...@googlegroups.com
Since there has been no final release of Slick, there have been no final benchmarks released.

Slick is faster than Sizzle on some common selectors.
Sizzle is faster than Slick overall.

Slick supports more selectors and passes more tests than Sizzle.

The first goal of Slick 1.0 is passing specs.
The second goal of Slick 1.0 is to be very fast, 
but not to sacrifice selector support and accuracy for a few extra ops/sec.

It doesn’t matter how quickly you get the wrong answer ;)


Results as of:

Mon Jan 11 2010

Sizzle edge 9AAF3C9A
Safari 4: 1349 examples 76 failures 38 errors
IE 6: 1119 examples 12 failures 10 errors
Sizzle jQuery 1.4
Safari 4: 1277 examples 74 failures 38 errors
Sizzle jQuery 1.3
Safari 4: 1277 examples 438 failures 42 errors
MooTools Slick edge
Safari 4: 1690 examples 5 failures 0 errors
IE 6: 1165 examples 13 failures 0 errors
MooTools 1.2.4
Safari 4: 1213 examples 284 failures 191 errors
NWMatcher 20091231
Safari 4: 1138 examples 218 failures 248 errors
YUI 2.x
Safari 4: 1258 examples 471 failures 8 errors
NWMatcher has since gotten much much better. So these old results aren’t the best.
Sizzle probly got better since jQuery 1.4 first came out.
Slick also probly got better too.

— Tom Aylott – SubtleGradient – MooTools —

Savageman

unread,
Aug 16, 2010, 5:18:16 PM8/16/10
to MooTools Users
Wow, the test suite is very impressive. That feels like quality! :d
I didn't Sly was replaced by Slick. I know Sizzle is not part of
MooTools (it's from John Resig / jQuery).

The tests shows a big improvement for Sizzle from 1.3 to 1.4 and a
great score for Slick (compared to current MooTools).

Are those Selectors engine supposed to run "better" than
querySelectorAll() which will be included in every browser? (except
old versions of IE)
That's really interesting. :-)

Thomas Aylott

unread,
Aug 16, 2010, 9:47:50 PM8/16/10
to mootool...@googlegroups.com
Yes, actually.

IE8 implements QSA, but its QSA doesn’t support lots of the selectors that are pretty standard for all JS-based selector engines.
Some things in Slick are actually faster than in QSA alone. e.g. className selectors in Slick use getElementsByClassName internally which is much faster than QSA.
QSA is very strict, it will throw an error if there’s the slightest error with your selector or you use something it doesn’t support.
Slick supports all kinds of awesome extensions. You can create your own custom pseudoClasses and atrribute selectors. MooTools-Core uses that extensibility a lot.
QSA in browsers actually contains a few bugs that Slick fixes.

— Tom Aylott – SubtleGradient – MooTools —

Savageman

unread,
Aug 17, 2010, 2:53:09 AM8/17/10
to MooTools Users
Well, thank you for all of that. I don't think I have more questions
ATM. :-)
Reply all
Reply to author
Forward
0 new messages