<?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: Linked Lists: Part I</title>
	<atom:link href="http://jacksondunstan.com/articles/548/feed" rel="self" type="application/rss+xml" />
	<link>http://jacksondunstan.com/articles/548</link>
	<description>Mastering AS3</description>
	<lastBuildDate>Thu, 29 Jul 2010 17:30:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/548/comment-page-1#comment-460</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Sat, 19 Dec 2009 23:12:20 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=548#comment-460</guid>
		<description>I tried adding the &lt;tt&gt;final&lt;/tt&gt; keyword to &lt;tt&gt;LinkedListNode&lt;/tt&gt; and to &lt;tt&gt;LinkedList&lt;/tt&gt;, but it didn&#039;t make any difference to the performance. This is in keeping with my &lt;a href=&quot;/articles/413&quot; rel=&quot;nofollow&quot;&gt;findings&lt;/a&gt; for &lt;tt&gt;final&lt;/tt&gt; functions. That article was light on details though. Can you point me to a benchmark showing more about how to get a speedup out of &lt;tt&gt;final&lt;/tt&gt;? I&#039;d be quite interested in any approach that can speed up this code. Thanks.</description>
		<content:encoded><![CDATA[<p>I tried adding the <tt>final</tt> keyword to <tt>LinkedListNode</tt> and to <tt>LinkedList</tt>, but it didn&#8217;t make any difference to the performance. This is in keeping with my <a href="/articles/413" rel="nofollow">findings</a> for <tt>final</tt> functions. That article was light on details though. Can you point me to a benchmark showing more about how to get a speedup out of <tt>final</tt>? I&#8217;d be quite interested in any approach that can speed up this code. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jonathan</title>
		<link>http://jacksondunstan.com/articles/548/comment-page-1#comment-459</link>
		<dc:creator>jonathan</dc:creator>
		<pubDate>Sat, 19 Dec 2009 21:54:43 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=548#comment-459</guid>
		<description>Have you try final keyword for your node. it&#039;s increase performance when you browse a linked list (see http://www.quasimondo.com/archives/000692.php).</description>
		<content:encoded><![CDATA[<p>Have you try final keyword for your node. it&#8217;s increase performance when you browse a linked list (see <a href="http://www.quasimondo.com/archives/000692.php)" rel="nofollow">http://www.quasimondo.com/archives/000692.php)</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/548/comment-page-1#comment-458</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Sat, 19 Dec 2009 18:47:39 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=548#comment-458</guid>
		<description>There are two issues here:

&lt;strong&gt;Performance&lt;/strong&gt; - As you point out, calling methods on interfaces is slow. I also showed this in my article on &lt;a href=&quot;/articles/413&quot; rel=&quot;nofollow&quot;&gt;function performance&lt;/a&gt;. I assume you mean some kind of getter for the node data here. My approach requires no function call, getter or otherwise, but instead just accesses an untyped variable (&lt;tt&gt;*&lt;/tt&gt;). This is consistent with the &lt;tt&gt;Array&lt;/tt&gt; API in that it simply holds anything you want. Even if you did have a getter for the data, it too would need to be untyped so as to support any type and be portable and reusable, as you point out.

&lt;strong&gt;Number of objects&lt;/strong&gt; - An interface doesn&#039;t get around the creation of objects. You have to have an object at each node so that you can hold the next and previous pointers. The only way around this would be to require that the only data allowed to be stored in the list would have these pointers built into it. This is possible using an interface, but gets really restrictive when you consider that you have to create node wrapper classes a lot (eg. &lt;tt&gt;class StringNode&lt;/tt&gt;, &lt;tt&gt;class IntNode&lt;/tt&gt;, &lt;tt&gt;class UintNode&lt;/tt&gt;, ...). Still, instances of these node wrappers are also objects. So I&#039;m not sure how you can save on the number of objects. Could you show an example?

PS: I think I&#039;ve found &lt;a href=&quot;http://blog.alanklement.com/2009/11/27/data-structors-with-as3-linked-list/&quot; rel=&quot;nofollow&quot;&gt;your article&lt;/a&gt; about AS3 linked lists. I&#039;d like to read a follow-up to it showing the complete linked list class and some usage examples. Do you have one? I&#039;d like to learn more about your strategy. :)</description>
		<content:encoded><![CDATA[<p>There are two issues here:</p>
<p><strong>Performance</strong> &#8211; As you point out, calling methods on interfaces is slow. I also showed this in my article on <a href="/articles/413" rel="nofollow">function performance</a>. I assume you mean some kind of getter for the node data here. My approach requires no function call, getter or otherwise, but instead just accesses an untyped variable (<tt>*</tt>). This is consistent with the <tt>Array</tt> API in that it simply holds anything you want. Even if you did have a getter for the data, it too would need to be untyped so as to support any type and be portable and reusable, as you point out.</p>
<p><strong>Number of objects</strong> &#8211; An interface doesn&#8217;t get around the creation of objects. You have to have an object at each node so that you can hold the next and previous pointers. The only way around this would be to require that the only data allowed to be stored in the list would have these pointers built into it. This is possible using an interface, but gets really restrictive when you consider that you have to create node wrapper classes a lot (eg. <tt>class StringNode</tt>, <tt>class IntNode</tt>, <tt>class UintNode</tt>, &#8230;). Still, instances of these node wrappers are also objects. So I&#8217;m not sure how you can save on the number of objects. Could you show an example?</p>
<p>PS: I think I&#8217;ve found <a href="http://blog.alanklement.com/2009/11/27/data-structors-with-as3-linked-list/" rel="nofollow">your article</a> about AS3 linked lists. I&#8217;d like to read a follow-up to it showing the complete linked list class and some usage examples. Do you have one? I&#8217;d like to learn more about your strategy. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan</title>
		<link>http://jacksondunstan.com/articles/548/comment-page-1#comment-457</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Sat, 19 Dec 2009 14:38:42 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=548#comment-457</guid>
		<description>Why did you choose to go with node object vs. a node interface - my preferred approach.

Is it a performance issue? Interfaces are inherently slower and accessors are slow as well, but I find the flexibility of the interface much more portable and reusable.

Another downside to a node object is object creation. This implementation would require creating your value about, creating your node &#039;container&#039; and then nesting your data inside of the node - doubling the amount of objects you have.</description>
		<content:encoded><![CDATA[<p>Why did you choose to go with node object vs. a node interface &#8211; my preferred approach.</p>
<p>Is it a performance issue? Interfaces are inherently slower and accessors are slow as well, but I find the flexibility of the interface much more portable and reusable.</p>
<p>Another downside to a node object is object creation. This implementation would require creating your value about, creating your node &#8216;container&#8217; and then nesting your data inside of the node &#8211; doubling the amount of objects you have.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
