Re: [jQuery] Compiling selectors into native Javascript

2006-10-17 Thread Mark Gibson
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

Re: [jQuery] Compiling selectors into native Javascript

2006-10-17 Thread Dave Methvin
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,

Re: [jQuery] Compiling selectors into native Javascript

2006-10-17 Thread Mark Gibson
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

Re: [jQuery] Compiling selectors into native Javascript

2006-10-16 Thread Dave Methvin
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