Re: [JSMentors] Re: Speed of jQuery selectors - testing on http://jsperf.com

2011-01-21 Thread Cookson, Lee
The page took a very long time just to display for me in both firefox 4beta9 and chrome (latest). Ran tests on both. ==Lee On Jan 21, 2011, at 1:01 AM, Bill Heaton pixelhand...@gmail.com wrote: Correction: http://jsperf.com/jquery-selector-with-context-as-object/5 Oops, I forgot the

Re: [JSMentors] Re: Speed of jQuery selectors - testing on http://jsperf.com

2011-01-21 Thread Steven Yang
Hi as I remembered a while ago maybe at jQuery 1.2x or 1.3x, people recommended using .find or $(selector, context), one thing is simply because .find was just faster. Then I think it was John himself said that they both should do the same thing (performance wise). Now at jQuery 1.4 or 1.5, I

Re: [JSMentors] Re: Speed of jQuery selectors - testing on http://jsperf.com

2011-01-21 Thread Garrett Smith
On 1/20/11, Steven Yang kenshin...@gmail.com wrote: Hi as I remembered a while ago maybe at jQuery 1.2x or 1.3x, people recommended using .find or $(selector, context), one thing is simply because .find was just faster. Then I think it was John himself said that they both should do the same

Re: [JSMentors] Re: Speed of jQuery selectors - testing on http://jsperf.com

2011-01-21 Thread Garrett Smith
On 1/21/11, Garrett Smith dhtmlkitc...@gmail.com wrote: On 1/20/11, Steven Yang kenshin...@gmail.com wrote: Hi as I remembered a while ago maybe at jQuery 1.2x or 1.3x, people recommended using .find or $(selector, context), one thing is simply because .find was just faster. Then I think it

[JSMentors] Re: Speed of jQuery selectors - testing on http://jsperf.com

2011-01-20 Thread Bill Heaton
I just added one more test case to be fair comparing the cached object when selecting; so cached object used for context and also previous to .find() ... // method I prefer to use var area1 = document.getElementById('mypage'); $('.stuff', area1) $('.morestuff', area1) // method faster in firefox