Matt Kruse wrote:
And take a guess which is faster. Rather, don't guess but try the the
Speed Test.
Have you? Will you post the results?
Huh? The Speed Test on my site. I've ran it in everything from IE8 to
FF1 (and most in between). My Library kills its contemporaries (the
further back you go, the larger the margin).
Are you referring to this?:
http://www.cinsoft.net/mylib-testspeed.html
Because I see several problems with it. If not, could you let us know
what page we should examine?
The first problem I see is that you're comparing an up-to-date version
of My Library with a version of MooTools that came out in November,
2007, a version of Prototype from January, 2008, and a version of
JQuery from May, 2008. That is certainly enough to invalidate the
results in the fast-moving world of JS libraries.
Second of all, although slickspeed has numerous faults, it has
performed at least one useful service to the ecosystem of CSS selector
engines: it has helped to standardize the collection of selectors
libraries are expected to support. Instead of adding support for
these selectors, you simply remove 30% of the tests from the original
slickspeed. Five of those removed selectors cause errors in My
Library in recent versions of Firefox, Opera, and Webkit-based
browsers.
And third, even among those selectors tested, there are two ("*", and
"div + div") for which My Library returns different values in every
browser than do the other libraries. I haven't gone and counted, and
perhaps My Library is correct, but I'd be surprised if each of the
other libraries got it wrong, yet all got identical values.
I made two new versions based on the original slickspeed [1]. The
first one keeps intact the original selectors. It's at
http://scott.sauyet.com/Javascript/Test/slickspeed/2010-01-22a/
I used the latest versions of Dojo, JQuery, MooTools, and Prototype
from:
http://code.google.com/apis/ajaxlibs/
and the version of My Library posted here:
http://www.cinsoft.net/mylib-min.js
My results, all on Win XP SP2 (results in milliseconds, low numbers
are better):
Chrome 3.0.195.27 : Dojo - 4, JQ - 3, Moo - 56, Proto - 7, MyLib -
30
FF 3.5.7 : Dojo - 58, JQ - 40, Moo - 105, Proto - 58,
MyLib - 75
IE 8 : Dojo - 16, JQ - 16, Moo - 405, Proto - 282,
MyLib - 46
Opera 9.64 : Dojo - 30, JQ - 0, Moo - 94, Proto - 16, MyLib
- 0
Safari 4.0.3 : Dojo - 27, JQ - 25, Moo - 56, Proto - 30,
MyLib - 40
The second version uses the set of selectors from the My Library
page. It's at
http://scott.sauyet.com/Javascript/Test/slickspeed/2010-01-22b/
With the same testing configuration, my results were:
Chrome 3.0.195.27 : Dojo - 4, JQ - 3, Moo - 23, Proto - 13, MyLib
- 13
FF 3.5.7 : Dojo - 34, JQ - 21, Moo - 81, Proto - 50,
MyLib - 53
IE 8 : Dojo - 0, JQ - 0, Moo - 1063, Proto - 31,
MyLib - 0
Opera 9.64 : Dojo - 0, JQ - 0, Moo - 0, Proto - 16, MyLib -
0
Safari 4.0.3 : Dojo - 23, JQ - 15, Moo - 29, Proto - 22,
MyLib - 21
This hardly looks like a win for My Library.