<?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: How Not To Write A Game &#8211; The Reports of the Xbox 360 GC Are Greatly Exaggerated</title>
	<atom:link href="http://blog.nickgravelyn.com/2008/10/how-not-to-write-a-game-the-reports-of-the-xbox-360-gc-are-greatly-exaggerated/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nickgravelyn.com/2008/10/how-not-to-write-a-game-the-reports-of-the-xbox-360-gc-are-greatly-exaggerated/</link>
	<description></description>
	<lastBuildDate>Fri, 23 Jul 2010 01:34:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nick</title>
		<link>http://blog.nickgravelyn.com/2008/10/how-not-to-write-a-game-the-reports-of-the-xbox-360-gc-are-greatly-exaggerated/comment-page-1/#comment-44</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Tue, 14 Oct 2008 19:18:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickgravelyn.com/?p=387#comment-44</guid>
		<description>Yes, enumerations in generic collections when using any sort of comparison (be it the List.Contains method or as the key in a Dictionary) will incur boxing/unboxing as it puts it into an object and runs the Equals method on it. There is actually a way around that which involves making your own IEqualityComparer object and passing that to the collection. I summarized a couple of blog posts about that here: http://www.xnawiki.com/index.php?title=Enumerations_as_Dictionary_Keys.</description>
		<content:encoded><![CDATA[<p>Yes, enumerations in generic collections when using any sort of comparison (be it the List.Contains method or as the key in a Dictionary) will incur boxing/unboxing as it puts it into an object and runs the Equals method on it. There is actually a way around that which involves making your own IEqualityComparer object and passing that to the collection. I summarized a couple of blog posts about that here: <a href="http://www.xnawiki.com/index.php?title=Enumerations_as_Dictionary_Keys" rel="nofollow">http://www.xnawiki.com/index.php?title=Enumerations_as_Dictionary_Keys</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jsedlak</title>
		<link>http://blog.nickgravelyn.com/2008/10/how-not-to-write-a-game-the-reports-of-the-xbox-360-gc-are-greatly-exaggerated/comment-page-1/#comment-43</link>
		<dc:creator>jsedlak</dc:creator>
		<pubDate>Tue, 14 Oct 2008 19:13:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickgravelyn.com/?p=387#comment-43</guid>
		<description>I have never had a big problem with strings creating too much garbage. What I found on the Zune was that List`T.Contains and a Dictionary look up with an enumeration key both generated amazing amounts of garbage. It was causing constant collections.

The first was solved by simply looping through the collection and comparing myself. The second was solved by casting the enumeration values to shorts and using a short data type as the key in the Dictionary.

I think, in general, strings and foreach statements are fairly cheap in terms of garbage generation. You can clean them up for sure, but the gains made would be a lot less if you had spent time elsewhere.

Another thing to look out is setting render states and values in shaders. Much like strings, they are cheap operations but when you do a lot (and I mean a lot), you can start to have some minor problems.</description>
		<content:encoded><![CDATA[<p>I have never had a big problem with strings creating too much garbage. What I found on the Zune was that List`T.Contains and a Dictionary look up with an enumeration key both generated amazing amounts of garbage. It was causing constant collections.</p>
<p>The first was solved by simply looping through the collection and comparing myself. The second was solved by casting the enumeration values to shorts and using a short data type as the key in the Dictionary.</p>
<p>I think, in general, strings and foreach statements are fairly cheap in terms of garbage generation. You can clean them up for sure, but the gains made would be a lot less if you had spent time elsewhere.</p>
<p>Another thing to look out is setting render states and values in shaders. Much like strings, they are cheap operations but when you do a lot (and I mean a lot), you can start to have some minor problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Machaira</title>
		<link>http://blog.nickgravelyn.com/2008/10/how-not-to-write-a-game-the-reports-of-the-xbox-360-gc-are-greatly-exaggerated/comment-page-1/#comment-45</link>
		<dc:creator>Machaira</dc:creator>
		<pubDate>Mon, 06 Oct 2008 12:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickgravelyn.com/?p=387#comment-45</guid>
		<description>I&#039;ve always been in the &quot;don&#039;t optimize unless you need to&quot; camp. It takes enough time and effort just to get a game done that I don&#039;t want to waste it on not-very-useful optimizations.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve always been in the &#8220;don&#8217;t optimize unless you need to&#8221; camp. It takes enough time and effort just to get a game done that I don&#8217;t want to waste it on not-very-useful optimizations.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
