<?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"
	>
<channel>
	<title>Comments for Coder Corner</title>
	<atom:link href="http://www.codercorner.com/blog/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://www.codercorner.com/blog</link>
	<description>Home of Pierre Terdiman</description>
	<pubDate>Fri, 10 Sep 2010 03:15:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>Comment on Size of empty classes by admin</title>
		<link>http://www.codercorner.com/blog/?p=410#comment-9958</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 09 Sep 2010 07:52:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorner.com/blog/?p=410#comment-9958</guid>
		<description>Dave: it doesn't matter if you *write* it directly or indirectly. What matters is how fast you can *load* it. And to make loading as fast as possible, you do want to write a copy of what you have in memory directly to disk. The loading then just becomes: fread one big block, call "finishing ctors" for objects in the block to initialize the v-tables, done. No data copy, no memory allocation, nada. Some people call this "load-in-place". Reading each field individually is too slow for us.

Anyway the problem with this is that everything gets written to disk: v-tables, padding bytes, mysterious bytes from the (lack of) empty base class optimization, etc. So yeah, everything counts. The great thing is that it makes you painfully aware of how much bytes you waste, and where. Especially when you then write converters from PC binary files to, say, PS3 binary files - the class layout is not always the same, so, serious "fun" follows.</description>
		<content:encoded><![CDATA[<p>Dave: it doesn&#8217;t matter if you *write* it directly or indirectly. What matters is how fast you can *load* it. And to make loading as fast as possible, you do want to write a copy of what you have in memory directly to disk. The loading then just becomes: fread one big block, call &#8220;finishing ctors&#8221; for objects in the block to initialize the v-tables, done. No data copy, no memory allocation, nada. Some people call this &#8220;load-in-place&#8221;. Reading each field individually is too slow for us.</p>
<p>Anyway the problem with this is that everything gets written to disk: v-tables, padding bytes, mysterious bytes from the (lack of) empty base class optimization, etc. So yeah, everything counts. The great thing is that it makes you painfully aware of how much bytes you waste, and where. Especially when you then write converters from PC binary files to, say, PS3 binary files - the class layout is not always the same, so, serious &#8220;fun&#8221; follows.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Size of empty classes by David Black</title>
		<link>http://www.codercorner.com/blog/?p=410#comment-9948</link>
		<dc:creator>David Black</dc:creator>
		<pubDate>Wed, 08 Sep 2010 17:57:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorner.com/blog/?p=410#comment-9948</guid>
		<description>Since when is writing a structure directly to a file a good idea anyway?

At the very least you need to swizzle all fields to account for endian-ness. 

At which point you might as well write code to read/write each field individually (or have your reflection system do this). Then you know exactly what is being written irrespective of class/struct size.</description>
		<content:encoded><![CDATA[<p>Since when is writing a structure directly to a file a good idea anyway?</p>
<p>At the very least you need to swizzle all fields to account for endian-ness. </p>
<p>At which point you might as well write code to read/write each field individually (or have your reflection system do this). Then you know exactly what is being written irrespective of class/struct size.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Character slicing demo by ComNik</title>
		<link>http://www.codercorner.com/blog/?p=258#comment-9835</link>
		<dc:creator>ComNik</dc:creator>
		<pubDate>Thu, 02 Sep 2010 20:09:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorner.com/blog/?p=258#comment-9835</guid>
		<description>Really "nice" demo!
Saw the rising trailer and asked myself how they get this one to work, and tada! ;)

One thing: Why are multiple cut lines not allowed/possivle?</description>
		<content:encoded><![CDATA[<p>Really &#8220;nice&#8221; demo!<br />
Saw the rising trailer and asked myself how they get this one to work, and tada! <img src='http://www.codercorner.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>One thing: Why are multiple cut lines not allowed/possivle?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Size of empty classes by Bruno</title>
		<link>http://www.codercorner.com/blog/?p=410#comment-9834</link>
		<dc:creator>Bruno</dc:creator>
		<pubDate>Thu, 02 Sep 2010 18:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorner.com/blog/?p=410#comment-9834</guid>
		<description>Just my 2 cents: this is called empty base class optimization :).</description>
		<content:encoded><![CDATA[<p>Just my 2 cents: this is called empty base class optimization :).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Controlling the size of enums by admin</title>
		<link>http://www.codercorner.com/blog/?p=395#comment-9822</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 02 Sep 2010 13:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorner.com/blog/?p=395#comment-9822</guid>
		<description>It's important on PS3 for example, where the SPU memory is quite limited. Thanks for your feedback guys, very useful.</description>
		<content:encoded><![CDATA[<p>It&#8217;s important on PS3 for example, where the SPU memory is quite limited. Thanks for your feedback guys, very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Controlling the size of enums by SoulTaker</title>
		<link>http://www.codercorner.com/blog/?p=395#comment-9819</link>
		<dc:creator>SoulTaker</dc:creator>
		<pubDate>Thu, 02 Sep 2010 12:07:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorner.com/blog/?p=395#comment-9819</guid>
		<description>And btw, IT IS supported by GCC starting from 4.4:
http://gcc.gnu.org/projects/cxx0x.html</description>
		<content:encoded><![CDATA[<p>And btw, IT IS supported by GCC starting from 4.4:<br />
<a href="http://gcc.gnu.org/projects/cxx0x.html" rel="nofollow">http://gcc.gnu.org/projects/cxx0x.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Controlling the size of enums by SoulTaker</title>
		<link>http://www.codercorner.com/blog/?p=395#comment-9818</link>
		<dc:creator>SoulTaker</dc:creator>
		<pubDate>Thu, 02 Sep 2010 12:05:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorner.com/blog/?p=395#comment-9818</guid>
		<description>This is good one, but isn't is part of c++0x?
And if not, maybe you should mention this one:
http://en.wikipedia.org/wiki/C%2B%2B0x#Strongly_typed_enumerations</description>
		<content:encoded><![CDATA[<p>This is good one, but isn&#8217;t is part of c++0x?<br />
And if not, maybe you should mention this one:<br />
<a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Strongly_typed_enumerations" rel="nofollow">http://en.wikipedia.org/wiki/C%2B%2B0x#Strongly_typed_enumerations</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Controlling the size of enums by David Sveningsson</title>
		<link>http://www.codercorner.com/blog/?p=395#comment-9816</link>
		<dc:creator>David Sveningsson</dc:creator>
		<pubDate>Thu, 02 Sep 2010 10:12:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorner.com/blog/?p=395#comment-9816</guid>
		<description>It is supported by gcc, just use the -std=c++0x flag</description>
		<content:encoded><![CDATA[<p>It is supported by gcc, just use the -std=c++0x flag</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Controlling the size of enums by guardian</title>
		<link>http://www.codercorner.com/blog/?p=395#comment-9815</link>
		<dc:creator>guardian</dc:creator>
		<pubDate>Thu, 02 Sep 2010 09:42:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorner.com/blog/?p=395#comment-9815</guid>
		<description>Out of curiosity, apart from when coding 4k or 64k; when is it that important to save those few bytes?</description>
		<content:encoded><![CDATA[<p>Out of curiosity, apart from when coding 4k or 64k; when is it that important to save those few bytes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Size of empty classes by guardian</title>
		<link>http://www.codercorner.com/blog/?p=410#comment-9814</link>
		<dc:creator>guardian</dc:creator>
		<pubDate>Thu, 02 Sep 2010 09:32:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorner.com/blog/?p=410#comment-9814</guid>
		<description>see there for more insight of vc++'s behavior: http://connect.microsoft.com/VisualStudio/feedback/details/100686/empty-member-optimization-not-working-properly</description>
		<content:encoded><![CDATA[<p>see there for more insight of vc++&#8217;s behavior: <a href="http://connect.microsoft.com/VisualStudio/feedback/details/100686/empty-member-optimization-not-working-properly" rel="nofollow">http://connect.microsoft.com/VisualStudio/feedback/details/100686/empty-member-optimization-not-working-properly</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
