<?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: Break That Thumb For Best iPhone Performance</title>
	<atom:link href="http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance/feed" rel="self" type="application/rss+xml" />
	<link>http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance</link>
	<description>Living the indie life</description>
	<lastBuildDate>Thu, 09 Feb 2012 12:36:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: BAD_ACCESS, Thumbs and Zombies &#171; Evilog</title>
		<link>http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance/comment-page-1#comment-1854</link>
		<dc:creator>BAD_ACCESS, Thumbs and Zombies &#171; Evilog</dc:creator>
		<pubDate>Sun, 19 Apr 2009 05:07:50 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=239#comment-1854</guid>
		<description>[...] linking to several libraries.  The application and most of the libraries were compiled without Thumb support.  However, on a single library I hadn&#8217;t disabled Thumb mode.  When I Disabled thumb mode [...]</description>
		<content:encoded><![CDATA[<p>[...] linking to several libraries.  The application and most of the libraries were compiled without Thumb support.  However, on a single library I hadn&#8217;t disabled Thumb mode.  When I Disabled thumb mode [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Disassembling iPhoneOS binaries with Idis.pl &#124; PiMPMiPhone.info</title>
		<link>http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance/comment-page-1#comment-869</link>
		<dc:creator>Disassembling iPhoneOS binaries with Idis.pl &#124; PiMPMiPhone.info</dc:creator>
		<pubDate>Thu, 22 Jan 2009 17:26:26 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=239#comment-869</guid>
		<description>[...] There&#8217;s a handy little perl script created by Nate True(*) called idis.pl that can be used for disassembly of iPhoneOS binaries, at least those written in ARM. Fortunately, most are (the iPhone&#8217;s CPU is an ARM chip; the machine code for it is written either in ARM or in Thumb. Thumb can result in a smaller memory footprint and file size, but ARM seems to yield much faster performance, especially when a lot of floating point calculations are needed. Thus, most devs would prefer to use ARM and try to avoid compiling for Thumb completely.). [...]</description>
		<content:encoded><![CDATA[<p>[...] There&#8217;s a handy little perl script created by Nate True(*) called idis.pl that can be used for disassembly of iPhoneOS binaries, at least those written in ARM. Fortunately, most are (the iPhone&#8217;s CPU is an ARM chip; the machine code for it is written either in ARM or in Thumb. Thumb can result in a smaller memory footprint and file size, but ARM seems to yield much faster performance, especially when a lot of floating point calculations are needed. Thus, most devs would prefer to use ARM and try to avoid compiling for Thumb completely.). [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cak</title>
		<link>http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance/comment-page-1#comment-798</link>
		<dc:creator>cak</dc:creator>
		<pubDate>Mon, 12 Jan 2009 05:49:29 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=239#comment-798</guid>
		<description>Great post, would have been better if you supplied some info on how to switch if off.</description>
		<content:encoded><![CDATA[<p>Great post, would have been better if you supplied some info on how to switch if off.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance/comment-page-1#comment-763</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 06 Jan 2009 13:30:35 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=239#comment-763</guid>
		<description>@Brad: Well, yes and no.  Basically, you don&#039;t have individual modules/routines switching between Thumb and ARM.  Usually a single compilation unit will be done in Thumb or ARM mode.  (i.e. minimum one function, perhaps a set of functions, whatever is in the file.)

So when ARM func A() calls (branches) to Thumb code B(), it simultaneously switches modes.  Same thing on the way out.

In other words, it was going to take the branch anyway.  It&#039;s just a question of mode the CPU is in once it lands in the new routine.</description>
		<content:encoded><![CDATA[<p>@Brad: Well, yes and no.  Basically, you don&#8217;t have individual modules/routines switching between Thumb and ARM.  Usually a single compilation unit will be done in Thumb or ARM mode.  (i.e. minimum one function, perhaps a set of functions, whatever is in the file.)</p>
<p>So when ARM func A() calls (branches) to Thumb code B(), it simultaneously switches modes.  Same thing on the way out.</p>
<p>In other words, it was going to take the branch anyway.  It&#8217;s just a question of mode the CPU is in once it lands in the new routine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Shuttlewood</title>
		<link>http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance/comment-page-1#comment-762</link>
		<dc:creator>Andrew Shuttlewood</dc:creator>
		<pubDate>Tue, 06 Jan 2009 09:52:48 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=239#comment-762</guid>
		<description>The nice thing is that on the latest and greatest ARM processors (like the Cortex A-8), they have &#039;Thumb-2&#039; - which has 16bit instructions for 90% of stuff, but also supports floating point instructions without changing mode.

The only downside is that the Cortex A-8 has different floating point performance than the ARM11 (quite a bit worse if you don&#039;t use the SIMD float instructions)</description>
		<content:encoded><![CDATA[<p>The nice thing is that on the latest and greatest ARM processors (like the Cortex A-8), they have &#8216;Thumb-2&#8242; &#8211; which has 16bit instructions for 90% of stuff, but also supports floating point instructions without changing mode.</p>
<p>The only downside is that the Cortex A-8 has different floating point performance than the ARM11 (quite a bit worse if you don&#8217;t use the SIMD float instructions)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance/comment-page-1#comment-758</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 06 Jan 2009 00:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=239#comment-758</guid>
		<description>Also, Core Animation does everything in floating point and is OpenGL-based. So Core Animation-based games and apps could be better off by Thumb-breaking. Of course, do your profiling.</description>
		<content:encoded><![CDATA[<p>Also, Core Animation does everything in floating point and is OpenGL-based. So Core Animation-based games and apps could be better off by Thumb-breaking. Of course, do your profiling.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad</title>
		<link>http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance/comment-page-1#comment-756</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Mon, 05 Jan 2009 23:57:33 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=239#comment-756</guid>
		<description>To switch between THUMB and ARM code the processor does a branch.  If I recall, Thumb code has a branch address with the lowest bit set - the instructions are at the 16 bit aligned address &amp; the bit indicates Thumb mode.  So, if you are constantly swapping in and out of Thumb mode, then you are branching like crazy.
Thumb code normally results in a 30% decrease in code size &amp; a small % in performance loss.</description>
		<content:encoded><![CDATA[<p>To switch between THUMB and ARM code the processor does a branch.  If I recall, Thumb code has a branch address with the lowest bit set &#8211; the instructions are at the 16 bit aligned address &amp; the bit indicates Thumb mode.  So, if you are constantly swapping in and out of Thumb mode, then you are branching like crazy.<br />
Thumb code normally results in a 30% decrease in code size &amp; a small % in performance loss.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noel</title>
		<link>http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance/comment-page-1#comment-754</link>
		<dc:creator>Noel</dc:creator>
		<pubDate>Mon, 05 Jan 2009 21:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=239#comment-754</guid>
		<description>Scott, Do you know if there are any matrix/vector math libraries using the VFP on the iPhone out there? I&#039;d love to change my matrix multiplies to use it. [Edit: I just found &lt;a href=&quot;http://code.google.com/p/vfpmathlibrary/&quot; rel=&quot;nofollow&quot;&gt;vpfmathlibrary&lt;/a&gt;. Time to check it out.]</description>
		<content:encoded><![CDATA[<p>Scott, Do you know if there are any matrix/vector math libraries using the VFP on the iPhone out there? I&#8217;d love to change my matrix multiplies to use it. [Edit: I just found <a href="http://code.google.com/p/vfpmathlibrary/" rel="nofollow">vpfmathlibrary</a>. Time to check it out.]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Brooks</title>
		<link>http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance/comment-page-1#comment-753</link>
		<dc:creator>Scott Brooks</dc:creator>
		<pubDate>Mon, 05 Jan 2009 21:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=239#comment-753</guid>
		<description>The floating point unit is the VFP, so a floating point multiply loads the into the vector processor, then does the multiply in the vector unit, and then copies it back out.  Which is kind of bad, but not nearly as bad as the if you are in thumb code.  Then it&#039;s a function call to dyld_stub___mulsf3vfp.

We found a huge improvement writing our skinning loop directly for the VFP.</description>
		<content:encoded><![CDATA[<p>The floating point unit is the VFP, so a floating point multiply loads the into the vector processor, then does the multiply in the vector unit, and then copies it back out.  Which is kind of bad, but not nearly as bad as the if you are in thumb code.  Then it&#8217;s a function call to dyld_stub___mulsf3vfp.</p>
<p>We found a huge improvement writing our skinning loop directly for the VFP.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

