<?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>Reacties op: Boxing/Unboxing In .NET</title>
	<atom:link href="http://www.cumps.be/boxing-unboxing-in-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cumps.be/boxing-unboxing-in-net/</link>
	<description>Living my life...</description>
	<lastBuildDate>Sat, 12 Dec 2009 22:49:53 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Door: Llamar o no a GC.Collect directamente - la visiÃ³n de un ingeniero de campo</title>
		<link>http://www.cumps.be/boxing-unboxing-in-net/comment-page-1/#comment-171</link>
		<dc:creator>Llamar o no a GC.Collect directamente - la visiÃ³n de un ingeniero de campo</dc:creator>
		<pubDate>Mon, 23 Feb 2009 22:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cumps.be/boxingunboxing-in-net/#comment-171</guid>
		<description>[...] cuando utilizamos funciones o tipos que reciben object en vez del tipo espec&#237;fico. En el siguiente post se muestra c&#243;mo detectar y minimizar este patr&#243;n de [...]</description>
		<content:encoded><![CDATA[<p>[...] cuando utilizamos funciones o tipos que reciben object en vez del tipo espec&iacute;fico. En el siguiente post se muestra c&oacute;mo detectar y minimizar este patr&oacute;n de [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Door: David Cumps</title>
		<link>http://www.cumps.be/boxing-unboxing-in-net/comment-page-1/#comment-167</link>
		<dc:creator>David Cumps</dc:creator>
		<pubDate>Sat, 05 Apr 2008 08:10:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cumps.be/boxingunboxing-in-net/#comment-167</guid>
		<description>I guess it clones the object when you pass it along without the ref. I wouldn&#039;t exactly know though, maybe it&#039;s done like that to prevent implicit changes from happening.

The only thing why I wanted to know about boxing/unboxing is not to somehow &#039;abuse&#039; it making my code less readable, but to understand how the old (non-generic) .NET classes worked internally.</description>
		<content:encoded><![CDATA[<p>I guess it clones the object when you pass it along without the ref. I wouldn&#8217;t exactly know though, maybe it&#8217;s done like that to prevent implicit changes from happening.</p>
<p>The only thing why I wanted to know about boxing/unboxing is not to somehow &#8216;abuse&#8217; it making my code less readable, but to understand how the old (non-generic) .NET classes worked internally.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Door: samehgaber</title>
		<link>http://www.cumps.be/boxing-unboxing-in-net/comment-page-1/#comment-169</link>
		<dc:creator>samehgaber</dc:creator>
		<pubDate>Fri, 29 Feb 2008 11:08:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cumps.be/boxingunboxing-in-net/#comment-169</guid>
		<description>Dear Mr.David
then
waht is the added value
I can send the variable by ref from the begining
I used boxing to let value type act as refernce type without passing it by ref
thanks a lot</description>
		<content:encoded><![CDATA[<p>Dear Mr.David<br />
then<br />
waht is the added value<br />
I can send the variable by ref from the begining<br />
I used boxing to let value type act as refernce type without passing it by ref<br />
thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>Door: David Cumps</title>
		<link>http://www.cumps.be/boxing-unboxing-in-net/comment-page-1/#comment-168</link>
		<dc:creator>David Cumps</dc:creator>
		<pubDate>Fri, 15 Feb 2008 21:12:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cumps.be/boxingunboxing-in-net/#comment-168</guid>
		<description>The following will display 51:

        static void Main(string[] args)
        {
            object o = 50;
            AddThrowBox(ref o);
            Console.WriteLine(o);
        }
        public static void AddThrowBox(ref object o)
        {
            o = ((int)o) + 1;
        }

Note the use of passing it by reference.</description>
		<content:encoded><![CDATA[<p>The following will display 51:</p>
<p>        static void Main(string[] args)<br />
        {<br />
            object o = 50;<br />
            AddThrowBox(ref o);<br />
            Console.WriteLine(o);<br />
        }<br />
        public static void AddThrowBox(ref object o)<br />
        {<br />
            o = ((int)o) + 1;<br />
        }</p>
<p>Note the use of passing it by reference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Door: SamehGaber</title>
		<link>http://www.cumps.be/boxing-unboxing-in-net/comment-page-1/#comment-170</link>
		<dc:creator>SamehGaber</dc:creator>
		<pubDate>Wed, 13 Feb 2008 12:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cumps.be/boxingunboxing-in-net/#comment-170</guid>
		<description>Dear Mr.David
This program display 50
I thing it Should be 51
am I reghit ?
Please help

class Program
    {
        static void Main(string[] args)
        {

            object o = 50;
            AddThrowBox(o);
            Console.WriteLine(o);
        }
       public static void AddThrowBox(object o)
        {
            o=((int)o)+1;
        }
    }</description>
		<content:encoded><![CDATA[<p>Dear Mr.David<br />
This program display 50<br />
I thing it Should be 51<br />
am I reghit ?<br />
Please help</p>
<p>class Program<br />
    {<br />
        static void Main(string[] args)<br />
        {</p>
<p>            object o = 50;<br />
            AddThrowBox(o);<br />
            Console.WriteLine(o);<br />
        }<br />
       public static void AddThrowBox(object o)<br />
        {<br />
            o=((int)o)+1;<br />
        }<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Door: David Cumps</title>
		<link>http://www.cumps.be/boxing-unboxing-in-net/comment-page-1/#comment-165</link>
		<dc:creator>David Cumps</dc:creator>
		<pubDate>Fri, 31 Aug 2007 13:08:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cumps.be/boxingunboxing-in-net/#comment-165</guid>
		<description>If you are multi threading and gain a 3second benefit those quickly add up, especially in AI scenarios where your calculations have to be done in specific time slices.

And in the places I used this, this list isn&#039;t the only performance benefit of course, otherwise I&#039;d agree, if you only used this and then would create some major inefficient algorithm, then it&#039;d be pointless.

But for places where you are tweaking everything, by using binary heaps for example instead of regular sorted lists, then a 3 sec (in my case this was running in 25 threads, which means a 75seconds gain) is quite significant.

(7seconds vs 79seconds, not bad ;p)</description>
		<content:encoded><![CDATA[<p>If you are multi threading and gain a 3second benefit those quickly add up, especially in AI scenarios where your calculations have to be done in specific time slices.</p>
<p>And in the places I used this, this list isn&#8217;t the only performance benefit of course, otherwise I&#8217;d agree, if you only used this and then would create some major inefficient algorithm, then it&#8217;d be pointless.</p>
<p>But for places where you are tweaking everything, by using binary heaps for example instead of regular sorted lists, then a 3 sec (in my case this was running in 25 threads, which means a 75seconds gain) is quite significant.</p>
<p>(7seconds vs 79seconds, not bad ;p)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Door: zuraff</title>
		<link>http://www.cumps.be/boxing-unboxing-in-net/comment-page-1/#comment-166</link>
		<dc:creator>zuraff</dc:creator>
		<pubDate>Fri, 31 Aug 2007 07:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cumps.be/boxingunboxing-in-net/#comment-166</guid>
		<description>This is a good explanation of boxing/unboxing issue, but I don&#039;t like two  things:
--&gt; Are you allowed to look with reflector at ArrayList implementation ?? I have doubts.
--&gt; Your benchmarking is not worth much if it ends up with time: 00:00:00.2915599, because in my opinion this is not enough long run and the result can be easily disturbed by other factors and system events.</description>
		<content:encoded><![CDATA[<p>This is a good explanation of boxing/unboxing issue, but I don&#8217;t like two  things:<br />
&#8211;&gt; Are you allowed to look with reflector at ArrayList implementation ?? I have doubts.<br />
&#8211;&gt; Your benchmarking is not worth much if it ends up with time: 00:00:00.2915599, because in my opinion this is not enough long run and the result can be easily disturbed by other factors and system events.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
