<?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: Minimizing memory use in embedded systems tip#2 &#8211; Be completely consistent in your coding style</title>
	<atom:link href="http://embeddedgurus.com/stack-overflow/2009/09/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/feed/" rel="self" type="application/rss+xml" />
	<link>http://embeddedgurus.com/stack-overflow/2009/09/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/</link>
	<description>Thoughts on embedded systems by Nigel Jones</description>
	<lastBuildDate>Fri, 10 Feb 2012 14:37:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Nigel Jones</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/09/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/comment-page-1/#comment-13153</link>
		<dc:creator>Nigel Jones</dc:creator>
		<pubDate>Mon, 16 Jan 2012 13:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/09/04/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/#comment-13153</guid>
		<description>Sure. One compiler I use all the time that does it is IAR&#039;s AVR compiler. IAR calls it &#039;Cross call&#039; optimization. You can specify the number of passes the compiler will use. For example, one project of mine compiles down to 42156 bytes with full size optimization except for cross call optimization. If I turn on unlimited cross call optimization, then the size reduces to 37006 - an impressive reduction of 12.2% . The compile time does of course go up slightly.</description>
		<content:encoded><![CDATA[<p>Sure. One compiler I use all the time that does it is IAR&#8217;s AVR compiler. IAR calls it &#8216;Cross call&#8217; optimization. You can specify the number of passes the compiler will use. For example, one project of mine compiles down to 42156 bytes with full size optimization except for cross call optimization. If I turn on unlimited cross call optimization, then the size reduces to 37006 &#8211; an impressive reduction of 12.2% . The compile time does of course go up slightly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Garry</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/09/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/comment-page-1/#comment-13134</link>
		<dc:creator>Garry</dc:creator>
		<pubDate>Mon, 16 Jan 2012 01:09:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/09/04/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/#comment-13134</guid>
		<description>Would you please give a reference to a HLL language *compiler* that does the &quot;subroutines of subroutines&quot; code compression?

I have used more than 20 different programming languages (FORTRAN, BASIC, Pascal, C, LISP, Ada, Postscript, Objective-C, C++, Scheme, Java, Erlang, Ruby, Python, JavaScript, several assemblers, several &quot;4GLs&quot;, etc.), and numerous implementations of them, I&#039;ve read and read about about many more programming systems. 

The ONLY language system I have ever seen, or read about, that use the mechanism the article describes are &quot;threaded&quot; or &quot;threaded and knotted&quot; systems, which I believe are rare and unusual. Forth and its progeny is one branch, and postscript another. All that I know of are interpreters, and not compilers.</description>
		<content:encoded><![CDATA[<p>Would you please give a reference to a HLL language *compiler* that does the &#8220;subroutines of subroutines&#8221; code compression?</p>
<p>I have used more than 20 different programming languages (FORTRAN, BASIC, Pascal, C, LISP, Ada, Postscript, Objective-C, C++, Scheme, Java, Erlang, Ruby, Python, JavaScript, several assemblers, several &#8220;4GLs&#8221;, etc.), and numerous implementations of them, I&#8217;ve read and read about about many more programming systems. </p>
<p>The ONLY language system I have ever seen, or read about, that use the mechanism the article describes are &#8220;threaded&#8221; or &#8220;threaded and knotted&#8221; systems, which I believe are rare and unusual. Forth and its progeny is one branch, and postscript another. All that I know of are interpreters, and not compilers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/09/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/comment-page-1/#comment-13121</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Sun, 15 Jan 2012 13:53:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/09/04/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/#comment-13121</guid>
		<description>Threaded is the term you are looking for.</description>
		<content:encoded><![CDATA[<p>Threaded is the term you are looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel Jones</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/09/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/comment-page-1/#comment-266</link>
		<dc:creator>Nigel Jones</dc:creator>
		<pubDate>Wed, 09 Sep 2009 10:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/09/04/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/#comment-266</guid>
		<description>Thanks for the information Anders - if I&#039;d thought about it I&#039;d have asked you first! Regarding the effectiveness on different architectures. If you are programming an 8051 then pretty much regardless of what you write in a HLL the object code comes out the same - for the simple reason that there really is only one way of doing many things in the 8051. Conversely CPUs that are register rich with orthogonal instruction can do a task in dozens of different ways. As a result I&#039;d expect that being consistent in your coding style would actually be &lt;b&gt;more&lt;/b&gt; beneficial with these types of CPUs. Having said that, I&#039;ve never run a test to support my hypothesis</description>
		<content:encoded><![CDATA[<p>Thanks for the information Anders &#8211; if I&#39;d thought about it I&#39;d have asked you first! Regarding the effectiveness on different architectures. If you are programming an 8051 then pretty much regardless of what you write in a HLL the object code comes out the same &#8211; for the simple reason that there really is only one way of doing many things in the 8051. Conversely CPUs that are register rich with orthogonal instruction can do a task in dozens of different ways. As a result I&#39;d expect that being consistent in your coding style would actually be <b>more</b> beneficial with these types of CPUs. Having said that, I&#39;ve never run a test to support my hypothesis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anders</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/09/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/comment-page-1/#comment-265</link>
		<dc:creator>Anders</dc:creator>
		<pubDate>Tue, 08 Sep 2009 06:44:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/09/04/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/#comment-265</guid>
		<description>I forgot to say that this kind of optimization is generally most efficient for 8-bit CPU&#039;s and  accumulator based architectures. This is because there will often be a lot of common sequences to work with, even if the programmer is inconsistent in his coding style.(The paper I mentioned is named &quot;Analyzing and compressing assembly code&quot; by Fraser et al. from 1984)</description>
		<content:encoded><![CDATA[<p>I forgot to say that this kind of optimization is generally most efficient for 8-bit CPU&#39;s and  accumulator based architectures. This is because there will often be a lot of common sequences to work with, even if the programmer is inconsistent in his coding style.(The paper I mentioned is named &quot;Analyzing and compressing assembly code&quot; by Fraser et al. from 1984)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anders</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/09/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/comment-page-1/#comment-264</link>
		<dc:creator>Anders</dc:creator>
		<pubDate>Mon, 07 Sep 2009 16:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/09/04/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/#comment-264</guid>
		<description>Well, There are several names but the most common are probably cross-jump and cross-call. They differ in what scope they have for the optimization.) One of the first papers on this method as applied to file scope called it a combination of cross-jump and procedural abstraction.</description>
		<content:encoded><![CDATA[<p>Well, There are several names but the most common are probably cross-jump and cross-call. They differ in what scope they have for the optimization.) One of the first papers on this method as applied to file scope called it a combination of cross-jump and procedural abstraction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel Jones</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/09/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/comment-page-1/#comment-263</link>
		<dc:creator>Nigel Jones</dc:creator>
		<pubDate>Sat, 05 Sep 2009 10:41:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/09/04/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/#comment-263</guid>
		<description>That was my first thought. However upon investigation, CSE seems to apply at the source code level - i.e. identifying common sub expressions in the source code. This technique applies at the object code level. As such it appears to be a combination of peep hole optimization + CSE.</description>
		<content:encoded><![CDATA[<p>That was my first thought. However upon investigation, CSE seems to apply at the source code level &#8211; i.e. identifying common sub expressions in the source code. This technique applies at the object code level. As such it appears to be a combination of peep hole optimization + CSE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: darkwzrd</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/09/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/comment-page-1/#comment-262</link>
		<dc:creator>darkwzrd</dc:creator>
		<pubDate>Sat, 05 Sep 2009 08:29:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/09/04/minimizing-memory-use-in-embedded-systems-tip2-be-completely-consistent-in-your-coding-style/#comment-262</guid>
		<description>&quot;As a final note, does anyone know the formal name for this type of optimization?&quot;I&#039;m guessing &quot;Common Subexpression Elimination&quot;, or CSE?</description>
		<content:encoded><![CDATA[<p>&quot;As a final note, does anyone know the formal name for this type of optimization?&quot;I&#39;m guessing &quot;Common Subexpression Elimination&quot;, or CSE?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

