Rey Bango wrote:
So at the end of the day, it comes down to this:
- We can increase selector speeds at the expense of file size
or
- We can continue to focus on providing tight code in a small package
and take what is arguably a small hit in speed
I've had no issues at all with JQuery's performance, so I'm all for
keeping on the current path.
But I have a question about what this test is comparing. JQuery does
not simply select DOM nodes, at least the way I've used it. It selects
DOM nodes and wraps each in a JQuery object. Do the other libraries do
something similar? I know Prototype used to add methods to Object's
prototype, and maybe to others' prototypes as well. I don't know if the
community complaints eventually made them change this. That sort of
technique would let them select DOM nodes only, but still have extended
functionality. I've never been happy with that method though, and
JQuery's system seems less fragile and error-prone.
So I guess the question is whether the comparisons are apples to apples.
-- Scott