John Resig wrote:
The thread about benchmarks got me thinking about compilation and caching of
selectors too. It could be a big win for benchmarks where they use the same
selector in a loop 1000 times! :-)
The problem with caching is that it's unable to handle situations
where the DOM
The thread about benchmarks got me thinking about compilation and
caching of selectors too. It could be a big win for benchmarks where
they use the same selector in a loop 1000 times! :-)
The problem with caching is that it's unable to handle situations
where the DOM changes in-between,
Dave Methvin wrote:
So my take was that the performance payback for simple selectors called
frequently could be good, but those cases are already pretty fast--we're
reducing a number that's already small. Complex selectors would still
require helper functions or compiled-in loops on every
Here's an idea for the future:
Multiple/alternative selector schemes (ie. CSS3, XPath1, XPath2)
and compilation of selectors into native Javascript.
The thread about benchmarks got me thinking about compilation and caching of
selectors too. It could be a big win for benchmarks where they use