<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Performance Quiz #11: Ten Questions on Value-Based Programming : Solution</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx</link><description>In my last quiz I asked a few questions about a few hypothetical classes that might appear in a value-rich context. I styled my example in the form of some graphics library classes but the idea is a general one. Many contexts can and should be rich in</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Rico Mariani's Performance Tidbits : Performance Quiz #11: Ten Questions on Value-Based Programming</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx#745112</link><pubDate>Fri, 08 Sep 2006 01:03:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:745112</guid><dc:creator>Rico Mariani's Performance Tidbits : Performance Quiz #11: Ten Questions on Value-Based Programming</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/ricom/archive/2006/08/31/733887.aspx"&gt;http://blogs.msdn.com/ricom/archive/2006/08/31/733887.aspx&lt;/a&gt;</description></item><item><title>re: Performance Quiz #11: Ten Questions on Value-Based Programming : Solution</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx#745220</link><pubDate>Fri, 08 Sep 2006 02:22:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:745220</guid><dc:creator>Pop Catalin Sever</dc:creator><description>&amp;quot;Question #10: How many rules did I break? :)&lt;br&gt;&lt;br&gt;I lost count. &amp;nbsp;I think three big ones but more than once each I suppose.&amp;quot;&lt;br&gt;&lt;br&gt;I think this is reqirement number one to be a great performance (games) programer : 'Break the rules but get that damn performance sky high!'.&lt;br&gt;&lt;br&gt;Those rules were made for the others, you can't have the same set of rules for two things that start with diferent premises. Performance programming never has the same set of guidelines with generic programming, atleast to my knowlege, and I guess never will.&lt;br&gt;&lt;br&gt;Thank you for the great articles so far, keep up the good work!&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Performance Quiz #11: Ten Questions on Value-Based Programming : Solution</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx#745525</link><pubDate>Fri, 08 Sep 2006 05:34:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:745525</guid><dc:creator>Pop Catalin Sever</dc:creator><description>&amp;quot;Question #5: Quad has no methods. &amp;nbsp;Why?&amp;quot;&lt;br&gt;&lt;br&gt;At least one method could be useful! A method wich changes the order of the corners either to retriangulate the quad or to flip the quad's triangles! Using a method on the quad rather than an method someplace else that recives a quad as a parameter will I think will have better perf because the method on the quad recives a managed pointer as a paramether raher than the structure's copy, so probably there is a reason to have methods on quad.</description></item><item><title>Structs versus classes in .NET</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx#745975</link><pubDate>Fri, 08 Sep 2006 11:24:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:745975</guid><dc:creator>Erwyn van der Meer</dc:creator><description>Microsoft's Rico Mariani has two very interesting posts that shed some light on when to prefer structs</description></item><item><title>re: Performance Quiz #11: Ten Questions on Value-Based Programming : Solution</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx#746408</link><pubDate>Fri, 08 Sep 2006 17:48:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:746408</guid><dc:creator>Serge</dc:creator><description>I still can't understand - why structs coudln't be inherited in C#? was it done for performance reasons or by some other limit in CLR?</description></item><item><title>re: Performance Quiz #11: Ten Questions on Value-Based Programming : Solution</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx#748450</link><pubDate>Sun, 10 Sep 2006 09:55:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:748450</guid><dc:creator>Thomas</dc:creator><description>Structs do not contain any sort of vtable and such, hence you can't do inheritance. If they did they would be classes.</description></item><item><title>re: Performance Quiz #11: Ten Questions on Value-Based Programming : Solution</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx#749929</link><pubDate>Tue, 12 Sep 2006 00:29:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:749929</guid><dc:creator>ricom</dc:creator><description>Of course that really only prevents virtual functions.&lt;br&gt;&lt;br&gt;I'd really be worried more about what the subtype behavior would be like. &amp;nbsp;Is it really safe to always pass a Child types where Base is expected? &amp;nbsp;What if Child used some of the gaps previously present in Base?&lt;br&gt;&lt;br&gt;I think this could be made to work, C++ does it after all, but then C++ has much more rigid rules about sharing types across assemblies and versioning them.&lt;br&gt;&lt;br&gt;I'd have to think about it.</description></item><item><title>Get quizzed by Rico!</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx#750113</link><pubDate>Tue, 12 Sep 2006 05:04:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:750113</guid><dc:creator>Scott Holden's Blog</dc:creator><description>Rico has been posting performance quizzes for a couple of years now. These are always interesting and...</description></item><item><title>Catching up...</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx#754629</link><pubDate>Thu, 14 Sep 2006 23:15:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:754629</guid><dc:creator>ctodx</dc:creator><description>I'm sure that it's the same for you: you go away on vacation, have a great time, come back and your email...</description></item><item><title>re: Performance Quiz #11: Ten Questions on Value-Based Programming : Solution</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx#756276</link><pubDate>Fri, 15 Sep 2006 21:03:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:756276</guid><dc:creator>Kris</dc:creator><description>Only the ignorant think any of those types should be classes. &amp;nbsp;They can go use Java3D if that's what they want. lol.&lt;br&gt;&lt;br&gt;Just do us all a favor and pass the large structures by &amp;quot;ref&amp;quot; where appropriate.&lt;br&gt;&lt;br&gt;This is how we *should* transform Vectors:&lt;br&gt;&lt;br&gt;public static void Vector3.Transform(ref Vector3 v, ref Matrix m);&lt;br&gt;&lt;br&gt;PLEASE DO NOT PASS A HUGE MATRIX BY VALUE TO A TRANSFORM FUNCTION! (Like the current XNA Api)&lt;br&gt;</description></item><item><title>Properties vs public fields redux...</title><link>http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx#1574460</link><pubDate>Thu, 01 Feb 2007 20:53:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1574460</guid><dc:creator>Eric Gunnerson's C# Compendium</dc:creator><description>&lt;p&gt;My blog reader burped recently, and gave forth a post (and reply ) than Rico wrote last September, but&lt;/p&gt;
</description></item></channel></rss>