<?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 for simianzombie.com</title>
	<atom:link href="http://simianzombie.com/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://simianzombie.com</link>
	<description>Adventures in Coding</description>
	<lastBuildDate>Fri, 18 May 2012 16:11:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on What Woopsi Did Next by Gregory Nutt</title>
		<link>http://simianzombie.com/?p=2217&#038;cpage=1#comment-6457</link>
		<dc:creator>Gregory Nutt</dc:creator>
		<pubDate>Fri, 18 May 2012 16:11:47 +0000</pubDate>
		<guid isPermaLink="false">http://simianzombie.com/?p=2217#comment-6457</guid>
		<description>Thanks to you and all of your effort on Woopsi.  I did have to make substantial changes because the NxWidgets run on to of a tiny graphics server and windowing system.  Integrating with that windowing system and with its font system was a challenge.

I am still scouring for things to remove so that I can get the footprint down for use in the tiniest MCUs.  I also expect to release a new version of NxWidgets in the next few days that will incorporate a tiny window manager.</description>
		<content:encoded><![CDATA[<p>Thanks to you and all of your effort on Woopsi.  I did have to make substantial changes because the NxWidgets run on to of a tiny graphics server and windowing system.  Integrating with that windowing system and with its font system was a challenge.</p>

<p>I am still scouring for things to remove so that I can get the footprint down for use in the tiniest MCUs.  I also expect to release a new version of NxWidgets in the next few days that will incorporate a tiny window manager.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Filled Polygons by Iterators and Bugfixes &#124; simianzombie.com</title>
		<link>http://simianzombie.com/?p=201&#038;cpage=1#comment-6144</link>
		<dc:creator>Iterators and Bugfixes &#124; simianzombie.com</dc:creator>
		<pubDate>Fri, 18 Nov 2011 19:08:06 +0000</pubDate>
		<guid isPermaLink="false">http://ant.simianzombie.com/blog/?p=201#comment-6144</guid>
		<description>[...] meaning to do for a while is replace any non-int iterator variables with ints. This was mentioned nearly a year ago by a chap called cearn, whose website I&#8217;ve been browsing through lately. In addition to his [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] meaning to do for a while is replace any non-int iterator variables with ints. This was mentioned nearly a year ago by a chap called cearn, whose website I&#8217;ve been browsing through lately. In addition to his [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on DS Homebrew by Woopsi Sourcecode Released &#124; simianzombie.com</title>
		<link>http://simianzombie.com/?page_id=128&#038;cpage=1#comment-6143</link>
		<dc:creator>Woopsi Sourcecode Released &#124; simianzombie.com</dc:creator>
		<pubDate>Fri, 18 Nov 2011 19:07:04 +0000</pubDate>
		<guid isPermaLink="false">http://ant.simianzombie.com/blog/?page_id=128#comment-6143</guid>
		<description>[...] Main menu Skip to primary content Skip to secondary content HomeFlash GamesJava GamesDS HomebrewJavaScriptMusic [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Main menu Skip to primary content Skip to secondary content HomeFlash GamesJava GamesDS HomebrewJavaScriptMusic [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Libnds and VC++ Express by Libnds and VC++ Express #2 &#124; simianzombie.com</title>
		<link>http://simianzombie.com/?p=49&#038;cpage=1#comment-6142</link>
		<dc:creator>Libnds and VC++ Express #2 &#124; simianzombie.com</dc:creator>
		<pubDate>Fri, 18 Nov 2011 19:06:05 +0000</pubDate>
		<guid isPermaLink="false">http://ant.simianzombie.com/blog/?p=49#comment-6142</guid>
		<description>[...] on from my earlier post about setting up Visual C++ 2005 Express for Libnds, here&#8217;s a few things I [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] on from my earlier post about setting up Visual C++ 2005 Express for Libnds, here&#8217;s a few things I [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Another Objective-C Gotcha: Synthesized Properties and Ivars by Ant</title>
		<link>http://simianzombie.com/?p=1795&#038;cpage=1#comment-5562</link>
		<dc:creator>Ant</dc:creator>
		<pubDate>Wed, 12 Oct 2011 12:23:32 +0000</pubDate>
		<guid isPermaLink="false">http://ant.simianzombie.com/?p=1795#comment-5562</guid>
		<description>Good point.  I&#039;ve seen that somewhere myself.</description>
		<content:encoded><![CDATA[<p>Good point.  I&#8217;ve seen that somewhere myself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Another Objective-C Gotcha: Synthesized Properties and Ivars by Jeff</title>
		<link>http://simianzombie.com/?p=1795&#038;cpage=1#comment-5561</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Wed, 12 Oct 2011 11:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://ant.simianzombie.com/?p=1795#comment-5561</guid>
		<description>Actually, I have this nagging suspicion there is an Apple guideline that says &quot;don&#039;t use property accessors in init or dealloc methods&quot;, though there&#039;s lots of debate around the interwebs about it.

Big picture, my attitude is &quot;if Apple say don&#039;t do it, don&#039;t do it&quot;.</description>
		<content:encoded><![CDATA[<p>Actually, I have this nagging suspicion there is an Apple guideline that says &#8220;don&#8217;t use property accessors in init or dealloc methods&#8221;, though there&#8217;s lots of debate around the interwebs about it.</p>

<p>Big picture, my attitude is &#8220;if Apple say don&#8217;t do it, don&#8217;t do it&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Really Bad Eggs &#8211; Objective-C Edition by Ant</title>
		<link>http://simianzombie.com/?p=1744&#038;cpage=1#comment-5163</link>
		<dc:creator>Ant</dc:creator>
		<pubDate>Fri, 12 Aug 2011 08:45:43 +0000</pubDate>
		<guid isPermaLink="false">http://ant.simianzombie.com/?p=1744#comment-5163</guid>
		<description>Thanks for the tip about Xcode&#039;s warning levels - I&#039;ll do that.

I have read up on autorelease pools, but that was about a year ago. I could do with a refresher.  What I found frustrating about the books I&#039;ve read is that they are all vague about how the pools and the autorelease method work.  &quot;Use autorelease,&quot; they say, &quot;if the caller needs to use the returned object.  It will be cleaned up at some point in the future.&quot;  They leave out any information about exactly *when* the objects will be cleaned up or *how*.

My current understanding (based more on educated guesses than documentation) is that pools are arranged in a stack.  The autorelease method adds a pointer to the current object to the top pool in the stack, which retains it.  When the pool is drained, all objects it has pointers to are released.

Yep, I&#039;m using @property and @synthesize.  That&#039;s another feature of Objective-C that I appreciate - properties deal with all that messy copying/assigning/retaining business when dealing with object trees.  They&#039;re quite well thought out.

Googling suggests that NSArrays are anywhere from 6x to 500x slower than C arrays depending on how you use them  The overhead of repeatedly allocating, populating and deallocating the array can only make the difference greater.  However, I&#039;m using NSArrays in a number of other places and don&#039;t have the same problem.  The method in question was being called an awful lot by the AI, and refactoring so that arrays weren&#039;t created at all fixed it.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip about Xcode&#8217;s warning levels - I&#8217;ll do that.</p>

<p>I have read up on autorelease pools, but that was about a year ago. I could do with a refresher.  What I found frustrating about the books I&#8217;ve read is that they are all vague about how the pools and the autorelease method work.  &#8220;Use autorelease,&#8221; they say, &#8220;if the caller needs to use the returned object.  It will be cleaned up at some point in the future.&#8221;  They leave out any information about exactly <em>when</em> the objects will be cleaned up or <em>how</em>.</p>

<p>My current understanding (based more on educated guesses than documentation) is that pools are arranged in a stack.  The autorelease method adds a pointer to the current object to the top pool in the stack, which retains it.  When the pool is drained, all objects it has pointers to are released.</p>

<p>Yep, I&#8217;m using @property and @synthesize.  That&#8217;s another feature of Objective-C that I appreciate - properties deal with all that messy copying/assigning/retaining business when dealing with object trees.  They&#8217;re quite well thought out.</p>

<p>Googling suggests that NSArrays are anywhere from 6x to 500x slower than C arrays depending on how you use them  The overhead of repeatedly allocating, populating and deallocating the array can only make the difference greater.  However, I&#8217;m using NSArrays in a number of other places and don&#8217;t have the same problem.  The method in question was being called an awful lot by the AI, and refactoring so that arrays weren&#8217;t created at all fixed it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Really Bad Eggs &#8211; Objective-C Edition by jeff</title>
		<link>http://simianzombie.com/?p=1744&#038;cpage=1#comment-5153</link>
		<dc:creator>jeff</dc:creator>
		<pubDate>Fri, 12 Aug 2011 03:44:06 +0000</pubDate>
		<guid isPermaLink="false">http://ant.simianzombie.com/?p=1744#comment-5153</guid>
		<description>Turn up your warning levels in XCode - it should have told you about the missing call to [super dealloc].

You should also read about autorelease pools (which are of course obsolete in ARC) - your autoreleased objects are not necessarily alive till the next iteration of the main runloop - anyone in the call stack might have a pool in place.

If you switch to using real &quot;@property&quot;s you&#039;ll find that more of the &quot;should I release/retain&quot; cruft disappears.

I&#039;m surprised you found NSArray inefficient, but its not impossible.  It might be worth ensuring that you aren&#039;t writing your own iterators to search, rather than using existing functions to locate things.  And if you know the size of your arrays in advance, make sure you use the correct initialisers because it will switch in different implementations under the covers that exploit the fixed characteristics.

Having said that, putting thousands of objects into an NSArray definitely killed the performance of at least one of my applications - you need to remember that when you take an object out of an array, NSArray sometimes has to retain/autorelease it to ensure that it doesn&#039;t go stale while you are holding it.  I think the use case they are protecting against is something stupid like

[myarray setObject:[myarray objectAtIndex:0] atIndex:0];

A no-op at best, but they try to ensure that it doesn&#039;t crash on you anyway.  Or so I believe ...</description>
		<content:encoded><![CDATA[<p>Turn up your warning levels in XCode - it should have told you about the missing call to [super dealloc].</p>

<p>You should also read about autorelease pools (which are of course obsolete in ARC) - your autoreleased objects are not necessarily alive till the next iteration of the main runloop - anyone in the call stack might have a pool in place.</p>

<p>If you switch to using real &#8220;@property&#8221;s you&#8217;ll find that more of the &#8220;should I release/retain&#8221; cruft disappears.</p>

<p>I&#8217;m surprised you found NSArray inefficient, but its not impossible.  It might be worth ensuring that you aren&#8217;t writing your own iterators to search, rather than using existing functions to locate things.  And if you know the size of your arrays in advance, make sure you use the correct initialisers because it will switch in different implementations under the covers that exploit the fixed characteristics.</p>

<p>Having said that, putting thousands of objects into an NSArray definitely killed the performance of at least one of my applications - you need to remember that when you take an object out of an array, NSArray sometimes has to retain/autorelease it to ensure that it doesn&#8217;t go stale while you are holding it.  I think the use case they are protecting against is something stupid like</p>

<p>[myarray setObject:[myarray objectAtIndex:0] atIndex:0];</p>

<p>A no-op at best, but they try to ensure that it doesn&#8217;t crash on you anyway.  Or so I believe &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Evaluating Online Backups by Backups and Dead Disks &#124; ant.simianzombie.com</title>
		<link>http://simianzombie.com/?p=1514&#038;cpage=1#comment-5040</link>
		<dc:creator>Backups and Dead Disks &#124; ant.simianzombie.com</dc:creator>
		<pubDate>Sat, 06 Aug 2011 15:30:44 +0000</pubDate>
		<guid isPermaLink="false">http://ant.simianzombie.com/?p=1514#comment-5040</guid>
		<description>[...] me that I&#8217;ve been meaning to write about my backup strategy. I&#8217;ve discussed it a couple of times, but it&#8217;s changed recently. I&#8217;ve dumped SuperDuper! and replaced it with Crash [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] me that I&#8217;ve been meaning to write about my backup strategy. I&#8217;ve discussed it a couple of times, but it&#8217;s changed recently. I&#8217;ve dumped SuperDuper! and replaced it with Crash [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Farewell, DS Homebrew by WoopsiGfx 1.4 — CONSOLE DEMON</title>
		<link>http://simianzombie.com/?p=1672&#038;cpage=1#comment-4856</link>
		<dc:creator>WoopsiGfx 1.4 — CONSOLE DEMON</dc:creator>
		<pubDate>Sun, 24 Jul 2011 14:07:44 +0000</pubDate>
		<guid isPermaLink="false">http://ant.simianzombie.com/?p=1672#comment-4856</guid>
		<description>[...] Download  Project Post Project Homepage Farewell &#116;&#111; DS Homebrew Source [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Download  Project Post Project Homepage Farewell &#116;&#111; DS Homebrew Source [&#8230;]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

