Well here is my personal (and widely uneducated) opinion on this speed test.
First what I think is good about it:
* each framework get's it's own iframe - avoid conflicts between them
* the test itself is written without using a framework
What I think is bad about it:
* There are 3 nth-child(x*n)-style tests that jQuery seems to choke
on as those selectors are not implemented in 1.1.2 (correct me if
I'm wrong). On my machine this equates in 617ms (20 %) of jQuery's
total test time (2857ms)
* The "div ~ div" selector seems to take jQuery really long to
perform, 1125ms (43%) go into it
* The div:only-child + div:contains selector seem to be slow in
jQuery and 203ms total (12%) go into them
What does this mean? It means that jQuery is nowhere as slow as the
final test results make it appear (26x slower then mootools). It means
that mootools got the performance lead in some specific selector (and
does good in general) which is given way too much "weight" by the test
itself.
I'm also questioning how far one can even go in terms of benchmarking
selector engines. I mean everybody has different needs. Most of the time
I use very simple selectors which jQuery does very fast according to the
test. So I'd actually be willing to loose performance on the more
complicated selectors if that allows the more common ones to run faster.
What's missing in my eyes is a survey or analysis of common selector
usage that could be used to weigh in the different selector results.
That being said I'm not trying to say jQuery is actually the "fastest"
library and the evil test just made it look bad. I'm sure there is room
for improvements and who knows what 1.1.3 will bring. But what I'm
trying to communicate is that it's not an easy job to actually interpret
the results coming from those speed tests and hence one should be very
careful when using them to make a point for one lib being faster then
another.
-- Felix Geisendörfer aka the_undefined
--------------------------
http://www.thinkingphp.org
http://www.fg-webdesign.de
Robert O'Rourke wrote:
Michael Stuhr wrote:
my results:
FF 2.0.0.4 WinXP-SP2
http://onenterframe.de/temp/
micha
Is Jquery slower because it's more compact then? ie. better for light
usage?
I much prefer the syntax and the community around jquery. I never got
any helpful responses from anyone on the mootools forum when I was
using that library.
Rob