<?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>How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx</link><description>By Fei Chen How are value types implemented in the 32-bit CLR? Value types are the closest thing in the common language runtime model to C++ structures. An instance of a value type is simply a blob of data in memory that contains all the fields in the</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>MSDN Blog Postings  &amp;raquo; How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#5846401</link><pubDate>Sat, 03 Nov 2007 01:29:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5846401</guid><dc:creator>MSDN Blog Postings  » How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://msdnrss.thecoderblogs.com/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance/"&gt;http://msdnrss.thecoderblogs.com/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#5850924</link><pubDate>Sat, 03 Nov 2007 07:09:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5850924</guid><dc:creator>Tanveer Badar</dc:creator><description>&lt;p&gt;I never knew the inefficiencies involved as they are not obvious in the first place. When can we expect the 'improved' inline to be available? .netfx 3.5 does not have these improvements to JIT I suppose.&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#5888302</link><pubDate>Sun, 04 Nov 2007 21:42:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5888302</guid><dc:creator>Surupa Biswas</dc:creator><description>&lt;p&gt;Hi Tanveer,&lt;/p&gt;
&lt;p&gt;No, this is currently work-in-progress, and as such these improvements aren't in .NET Framework 3.5. We're hoping to have these changes to the JIT included in our next release post .NET Framework 3.5.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Surupa Biswas&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#5922908</link><pubDate>Tue, 06 Nov 2007 03:02:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5922908</guid><dc:creator>kevinowen</dc:creator><description>&lt;p&gt;Awesome! I'm glad to hear that these performance issues are finally being addressed.&lt;/p&gt;
&lt;p&gt;I do have one question, though: Why can't these optimizations be performed if the value type is using auto-layout (that is, [StructLayout(LayoutKind.Auto)])? Shouldn't the runtime be able to use whatever layout is best when LayoutKind.Auto is specified?&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#5948777</link><pubDate>Wed, 07 Nov 2007 04:43:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5948777</guid><dc:creator>CLR Codegen Blogger</dc:creator><description>&lt;p&gt;Kevin, you are right. In theory, this optimization could be performed regardless of what the layout type is. Current implementation in the JIT, however, makes it easier to handle the sequential layout. You could consider this as a limitation in the JIT. Note that C# compiler does put in LayoutKind.Sequential by default for all structs.&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#5967691</link><pubDate>Wed, 07 Nov 2007 22:54:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5967691</guid><dc:creator>kevinowen</dc:creator><description>&lt;p&gt;OK, thank you for the clarification.&lt;/p&gt;
&lt;p&gt;I guess what I meant to ask was, since auto-layout essentially means &amp;quot;the runtime can lay out the type however it wants / however is most efficient&amp;quot;, and since it sounds like sequential-layout will be (if it is not already) the most efficient layout option for value types, couldn't auto-layout be treated as equivalent to sequential-layout for value types? Or in other words, couldn't specifying LayoutKind.Auto be interpreted by the runtime as LayoutKind.Sequential when it is used with a value type? This would then (I think) allow the optimizations you talked about to be transparently applied to auto-layout value types as well, since at that point they would be sequential-layout value types for all intents and purposes (at least from the runtime’s point of view, that is; anything external would still need to treat them as a &amp;quot;black box&amp;quot;, since using sequential-layout would be an implementation detail subject to change).&lt;/p&gt;
&lt;p&gt;Would doing something to this effect be too big of a change from the current implementation?&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#8414508</link><pubDate>Mon, 21 Apr 2008 15:36:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8414508</guid><dc:creator>LJH</dc:creator><description>&lt;p&gt;Do you have any update on your progress with the value type inlining? &amp;nbsp;I'm very interested in when this is going to be coming :)&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#8416187</link><pubDate>Tue, 22 Apr 2008 10:29:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8416187</guid><dc:creator>Surupa Biswas</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You'll be happy to know that the value type inlining changes are being included in the upcoming update to .NET Framework 3.5. Scott Guthrie writes more about this upcoming release here: &lt;a rel="nofollow" target="_new" href="http://weblogs.asp.net/scottgu/archive/2008/02/19/net-3-5-client-product-roadmap.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2008/02/19/net-3-5-client-product-roadmap.aspx&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Surupa&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#8522177</link><pubDate>Tue, 20 May 2008 11:59:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8522177</guid><dc:creator>LJH</dc:creator><description>&lt;p&gt;Do you know if these changes are in the Framework 3.5 Service Pack 1 Beta that's just been released?&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#8524096</link><pubDate>Tue, 20 May 2008 20:55:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8524096</guid><dc:creator>Surupa Biswas</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes, these changes are included in the .NET Framework 3.5 Service Pack 1 Beta that just got released.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Surupa&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#8836337</link><pubDate>Wed, 06 Aug 2008 09:57:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8836337</guid><dc:creator>alexey_r</dc:creator><description>&lt;p&gt;I was wondering about the following scenario: let's say we want to define FoldLeft and FoldRight on IEnumerable&amp;lt;T&amp;gt; and we need to actually make it an instance of IFoldable&amp;lt;T&amp;gt; (so simply using extension methods doesn't work). So we define &lt;/p&gt;
&lt;p&gt;struct RichEnumerable&amp;lt;T&amp;gt; : IFoldable&amp;lt;T&amp;gt; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;private readonly IEnumerable&amp;lt;T&amp;gt; _ts;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public RichEnumerable&amp;lt;T&amp;gt;(IEnumerable&amp;lt;T&amp;gt; ts) {_ts = ts; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp;//simple FoldLeft and FoldRight implementations&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public static implicit operator RichEnumerable&amp;lt;T&amp;gt;(IEnumerable&amp;lt;T&amp;gt; ts) {return new RichEnumerable&amp;lt;T&amp;gt;(ts); }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;then &lt;/p&gt;
&lt;p&gt;1) if a RichEnumerable appears as a local variable it will be inlined;&lt;/p&gt;
&lt;p&gt;2) if a RichEnumerable appears as a field it won't be inlined;&lt;/p&gt;
&lt;p&gt;3) if an IEnumerable appears as a field and converted on-the-fly to a RichEnumerable it will be inlined.&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#8836345</link><pubDate>Wed, 06 Aug 2008 09:59:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8836345</guid><dc:creator>alexey_r</dc:creator><description>&lt;p&gt;And a similar question for the case where we have a specific class/struct instead of the IEnumerable&amp;lt;T&amp;gt; interface.&lt;/p&gt;
</description></item><item><title>re: How are value types implemented in the 32-bit CLR? What has been done to improve their performance?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#8859635</link><pubDate>Wed, 13 Aug 2008 20:22:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8859635</guid><dc:creator>Kevin Frei</dc:creator><description>&lt;p&gt;You can install the NetFX35SP1 blob and try it yourself, now!&lt;/p&gt;
</description></item><item><title>What's in NetFX 3.5 SP1?</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#8870751</link><pubDate>Sat, 16 Aug 2008 00:20:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8870751</guid><dc:creator>JIT, NGen, and other Managed Code Generation Stuff</dc:creator><description>&lt;p&gt;Long time, no blog. Since the NetFX 3.5 Service Pack is available, now, I figured I’d put up a quick&lt;/p&gt;
</description></item><item><title>在.NET Framework 3.5 SP1中CLR的更新</title><link>http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in-the-32-bit-clr-what-has-been-done-to-improve-their-performance.aspx#8945972</link><pubDate>Fri, 12 Sep 2008 10:03:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8945972</guid><dc:creator>Joycode@Ab110.com</dc:creator><description>&lt;p&gt;【原文地址】 CLR Updates in .NET Framework 3.5 SP1 【原文发表日期】 19 August 08 07:57 Kevin Frie ，CLR核心部分的开发主管最近发布了一篇帖子&lt;/p&gt;
</description></item></channel></rss>