Mr. Selector, the neverending story

Mr. Selector, the neverending story

Hi Folks,

I read a lot about different ways and techniques to select DOM elements with jQuery.
Among other articles, Paul Irish's 'Anti-Patterns for Performance' presentation.

it looks like there are thousands ways to select something within the DOM (syntax/functions/parameters).
quick example:

  1. <HTML>
  2. <HEAD></HEAD>
  3.     <BODY>
  4.     <DIV class="container">
  5.         <DIV id="myelement"></DIV>
  6.     </DIV>
  7.     </BODY>
  8. </HTML>

$("div#myelement")
$("div.container > div#myelement")
$("div#myelement", "div.container")
$("#div.container").find("div#myelement")
.
.
.

I didn't make an ultimate performance test on all possibilitys, but what is in your oppinion the ultimate
way to select an element?
I guess $("div#myelement", "div.container") is better than $("div.container > div#myelement"), but not as
good(=fast?) as $("#div.container").find("div#myelement").

Do all of the above methods have a right to exist?