From: David Mark on
Scott Sauyet wrote:
> On Jan 22, 2:38 pm, David Mark <dmark.cins...(a)gmail.com> wrote:
>> 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

Yes.

>
> 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.

My Library is from the Fall of 2007 (the query stuff is untouched and
most is a matter of public record). The others are whatever was on the
test page when I copied it. It's not my original work (as noted).

> That is certainly enough to invalidate the
> results in the fast-moving world of JS libraries.

No, it isn't. It may change your interpretation of the results though.
Anything today is going to be a QSA wrapper, so such testing is largely
superfluous. I'll get to that.

>
> 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.

Great. It's all a waste of time.

> Instead of adding support for
> these selectors, you simply remove 30% of the tests from the original
> slickspeed.

So what? And I don't think it is 30%. More like ten of about fifty.
I've mentioned this numerous times and it says it right at the top of
the page. I don't feel it is useful to add all of those selectors, but
estimate it would take me an hour or two to do so. If the users really
care, I'll add them. I wrote the whole engine in a weekend. ;)

> Five of those removed selectors cause errors in My
> Library in recent versions of Firefox, Opera, and Webkit-based
> browsers.

They do not cause errors unless you do not follow the instructions. ;)
You aren't allowed to use selectors that aren't supported and the speed
test page is the indicator (as I've mentioned).

>
> 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.

That's not true. As noted, in IE, that test page has two extra elements
added by the Audio module. I should use a build without that module, of
course. I just ran it in Chrome (and have run it in virtually every
browser I have). For "*":-

4 ms | 251 found 8 ms | 251 found 2 ms | 251 found 3 ms | 251 found

All 251. That's what I have seen for years in all but IE.

As for the other one:-

2 ms | 242 found 6 ms | 242 found 4 ms | 242 found 3 ms | 242 found

All the same and I've run this on almost everything. So what are you
saying?


> 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.

See above.

>
> 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:

Okay, good. You are testing the very latest ones.

>
> http://code.google.com/apis/ajaxlibs/
>
> and the version of My Library posted here:
>
> http://www.cinsoft.net/mylib-min.js

Okay.

>
>
> My results, all on Win XP SP2 (results in milliseconds, low numbers
> are better):

Waste of time. They are all using QSA now, which is incompatible with
their "slow lane" branches. It's stupid. But I can add QSA too. It's
just silly to compare apples and oranges at the moment.

>
> 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
>

What do these totals even mean if you used selectors unsupported by My
Library?

>
> 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.
>

QSA. You might try IE in compatibility mode to get a level playing
field. But realize that the methods are built into the browsers, so
testing becomes a measure of just the wrappers (where mine will
certainly win again).

Also, you need to run these tests on slower machines. That's where the
results matter anyway. ;) For example, on FF1 on an old XP box, mine
came in thousands ahead of the nearest "competitor". Nobody cares about
a few milliseconds difference on fast machines. It's the phones and
other lesser browsers where speed kills.

I'll run a few tests here on an old machine and post the results...
From: David Mark on
Scott Sauyet wrote:
> On Jan 22, 2:38 pm, David Mark <dmark.cins...(a)gmail.com> wrote:
>> 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.
>

LOL. Here's a result from a relatively slow machine running FF1:-

999 1561 1107 842 358

The result is far more significant than the above (half of which are
completely irrelevant) combined.
From: David Mark on
David Mark wrote:
> Scott Sauyet wrote:
>> On Jan 22, 2:38 pm, David Mark <dmark.cins...(a)gmail.com> wrote:
>>> 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.
>>
>
> LOL. Here's a result from a relatively slow machine running FF1:-
>
> 999 1561 1107 842 358
>
> The result is far more significant than the above (half of which are
> completely irrelevant) combined.

Running it the latest Chrome, I did notice the two discrepancies.
Clearly this new test page has exposed some bugs. It can't be the same
content as the last one. I bet I'll fix them and they won't come back.
;) I'm not shocked that there are bugs in there. I've never claimed
to have tested the CSS selector queries with any sort of seriousness
(I've stated the exact opposite numerous times here).

Thing is, various people (who know who they are) should have been doing
what you are doing two years ago. That's how this project was supposed
to go. But never mind, no time like the present. I wouldn't bother
testing _unsupported_ selectors though. ;)

90 53 209 87 174

Not bad considering the others are using QSA (except perhaps Mootools,
which is still slower two years later). You have to test the fallback
branches to get an indication of how fast the query implementations are.
In fact, that's why my test page is actually better. It's the older,
slower, QSA-less browsers (and other agents) that will expose efficiency
problems. The new ones using QSA will all act about the same. As mine
is competitive even without QSA, it would seem to be the winner. ;)






From: RobG on
On Jan 23, 6:33 am, Ivan Marsh <ivanma...(a)yahoo.com> wrote:
[...]
> Don't need to elaborate on what I've said when it's all been done for me:
>
> "Someone is critical of a widely used library and at the same time promoting
> their own library? Call me cynical, but given the inherent conflict of
> interest I'd look for another opinion or 2 before taking their word as the
> definitive answer."

What is the point of an anonymous quote?

Initial responses to David's criticisms of various libraries were
along the lines of "you can't criticise it if you haven't written a
library". So he released his own.

Now the response is "you're only criticising it to promote your own".
Whatever.

Regarding the quote itself, should anyone adopt a library for a non-
trivial purpose without thoroughly reviewing it against their
requirements and and seeking expert opinions from various sources? And
if that is a recommended strategy for selecting a library, then how is
advising someone to do it a substantial criticism of MyLibrary?


--
Rob
From: David Mark on
David Mark wrote:
> David Mark wrote:
>> Scott Sauyet wrote:
>>> On Jan 22, 2:38 pm, David Mark <dmark.cins...(a)gmail.com> wrote:
>>>> 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.
>>>
>> LOL. Here's a result from a relatively slow machine running FF1:-
>>
>> 999 1561 1107 842 358
>>
>> The result is far more significant than the above (half of which are
>> completely irrelevant) combined.
>
> Running it the latest Chrome, I did notice the two discrepancies.
> Clearly this new test page has exposed some bugs. It can't be the same
> content as the last one. I bet I'll fix them and they won't come back.
> ;) I'm not shocked that there are bugs in there. I've never claimed
> to have tested the CSS selector queries with any sort of seriousness
> (I've stated the exact opposite numerous times here).
>
> Thing is, various people (who know who they are) should have been doing
> what you are doing two years ago. That's how this project was supposed
> to go. But never mind, no time like the present. I wouldn't bother
> testing _unsupported_ selectors though. ;)
>
> 90 53 209 87 174
>

They vary wildly from one load to the next:-

144 174 282 82 164

Clearly the results from Chrome are insignificant (as were most of
yours). Look for _major_ differences in the slower machines. That's
what tells the tale.