<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Which selector is faster?</title>
	<atom:link href="http://dev.iamntz.com/78/which-selector-is-faster/feed" rel="self" type="application/rss+xml" />
	<link>http://dev.iamntz.com/78/which-selector-is-faster</link>
	<description>Stuff about CSS, XHTML, Javascript and jQuery</description>
	<lastBuildDate>Mon, 08 Mar 2010 08:30:09 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Pete</title>
		<link>http://dev.iamntz.com/78/which-selector-is-faster/comment-page-1#comment-2049</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Mon, 20 Jul 2009 05:21:43 +0000</pubDate>
		<guid isPermaLink="false">http://dev.iamntz.com/?p=78#comment-2049</guid>
		<description>I&#039;ve seen so many debates on these issues recently while looking for something else, but the sad thing is, anyone that knows how javascript works, or understands the different offerings from the different browsers, will understand why there is no correct generic answer, or even browser or library specific answer on these topics, as every case is different.

&quot;ul li&quot; always slower than &quot;li&quot; because it has to run multiple searches for the same result set
&quot;form.class&quot; generally faster than &quot;.class&quot; because it can run getelementsbytagname first and greatly narrow down its result set. Depending on your browser and library, this difference may almost be reduced to 0 by the implementation of getelementsbyclassname that has been implemented natively in some browsers.
&quot;form#id&quot; slower than &quot;#id&quot; because you&#039;re running more searches than required by a simple getelementbyid

These are all scenarios that I&#039;ve seen people bring up as test cases for other scenarios and apply the &quot;well this is faster so that must be faster&quot; logic, without understanding what&#039;s really going on...</description>
		<content:encoded><![CDATA[<p>I&#8217;ve seen so many debates on these issues recently while looking for something else, but the sad thing is, anyone that knows how javascript works, or understands the different offerings from the different browsers, will understand why there is no correct generic answer, or even browser or library specific answer on these topics, as every case is different.</p>
<p>&#8220;ul li&#8221; always slower than &#8220;li&#8221; because it has to run multiple searches for the same result set<br />
&#8220;form.class&#8221; generally faster than &#8220;.class&#8221; because it can run getelementsbytagname first and greatly narrow down its result set. Depending on your browser and library, this difference may almost be reduced to 0 by the implementation of getelementsbyclassname that has been implemented natively in some browsers.<br />
&#8220;form#id&#8221; slower than &#8220;#id&#8221; because you&#8217;re running more searches than required by a simple getelementbyid</p>
<p>These are all scenarios that I&#8217;ve seen people bring up as test cases for other scenarios and apply the &#8220;well this is faster so that must be faster&#8221; logic, without understanding what&#8217;s really going on&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manuel</title>
		<link>http://dev.iamntz.com/78/which-selector-is-faster/comment-page-1#comment-839</link>
		<dc:creator>Manuel</dc:creator>
		<pubDate>Fri, 10 Oct 2008 10:16:58 +0000</pubDate>
		<guid isPermaLink="false">http://dev.iamntz.com/?p=78#comment-839</guid>
		<description>I think it&#039;s slower because it looks for all ul elements and after this looks again for all child li elements. So it takes to search attemps and not just one (but you can be shure all li&#039;s are childs of ul).</description>
		<content:encoded><![CDATA[<p>I think it&#8217;s slower because it looks for all ul elements and after this looks again for all child li elements. So it takes to search attemps and not just one (but you can be shure all li&#8217;s are childs of ul).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Optimiser l&#8217;utilisation des sélecteurs JQuery - Olivier El Mekki</title>
		<link>http://dev.iamntz.com/78/which-selector-is-faster/comment-page-1#comment-774</link>
		<dc:creator>Optimiser l&#8217;utilisation des sélecteurs JQuery - Olivier El Mekki</dc:creator>
		<pubDate>Tue, 30 Sep 2008 15:12:38 +0000</pubDate>
		<guid isPermaLink="false">http://dev.iamntz.com/?p=78#comment-774</guid>
		<description>[...] Ionut a récemment publié un article dans lequel il revient sur une &#8220;grosse erreur&#8221; dans la considération des performances [...]</description>
		<content:encoded><![CDATA[<p>[...] Ionut a récemment publié un article dans lequel il revient sur une &#8220;grosse erreur&#8221; dans la considération des performances [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
