<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://experience.fellowshipone.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>Intelligent Design : ASP.NET</title><link>http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/ASP.NET/default.aspx</link><description>Tags &amp; Topics: ASP.NET</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61120.2)</generator><item><title>Plasma, Dog Plasma: Generics vs. Objects</title><link>http://experience.fellowshipone.com/blogs/intelligentdesign/archive/2007/12/04/generics-vs-objects.aspx</link><pubDate>Tue, 04 Dec 2007 06:36:00 GMT</pubDate><guid isPermaLink="false">87eee960-b871-44cb-8a98-02588a960c04:9176</guid><dc:creator>FTProductDev</dc:creator><slash:comments>0</slash:comments><comments>http://experience.fellowshipone.com/blogs/intelligentdesign/comments/9176.aspx</comments><wfw:commentRss>http://experience.fellowshipone.com/blogs/intelligentdesign/commentrss.aspx?PostID=9176</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face=Calibri size=3&gt;I came across an interesting quote from &lt;A class="" title="Tony Northrup" href="http://www.vistaclues.com/%20" target=_blank&gt;Tony Northrup&lt;/A&gt; regarding .net Generics:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;“I haven’t been able to reproduce the performance benefits of generics; however, according to Microsoft, generics are faster than using casting.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;In practice, casting proved to be several times faster than using a generic.&amp;nbsp; However, you probably won't notice performance differences in your applications.”&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&lt;A class="" href="http://www.youtube.com/watch?v=xC5v8PVjBfk" target=_blank&gt;&lt;IMG title="Crazy Mixed up Pup" style="PADDING-RIGHT:0pt;PADDING-LEFT:10px;PADDING-BOTTOM:5px;WIDTH:320px;PADDING-TOP:5px;HEIGHT:240px;" height=240 alt="Crazy Mixed up Pup" src="https://experience.fellowshipone.com/images/blogs/crazymixeduppup.jpg" width=320 align=right&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;That reminded me of a 1954 cartoon called "&lt;A class="" title="Crazy Mixed Up Pup." href="http://www.youtube.com/watch?v=xC5v8PVjBfk" target=_blank&gt;Crazy Mixed Up Pup.&lt;/A&gt;"&amp;nbsp; There was a Doctor who was given a couple bottles of plasma but couldn't figure out which to use on the dog and which to use on the man - pure genius. While I hope I am never faced with the decision of which bottle of plasma to wire up to dog or man,&amp;nbsp;I often face the struggle of&amp;nbsp;pulling out the right tool for&amp;nbsp;a given need.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;For instance, .net has several different types of collections, not to mention generic collections introduced in 2.0, and others introduced by the &lt;A class="" title=community href="http://www.gotdotnet.com/content/featuredsite/powercollections/default.aspx" target=_blank&gt;community&lt;/A&gt;.&amp;nbsp; Let's face it, our tool bags are getting bigger, more robust - what do we do when we're introduced to things like Tony's discovery?&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face=Calibri size=3&gt;I chose to&amp;nbsp;put together a little project to see if I could reproduce his findings and dig out the right tool...&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Calibri size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Created a console application &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Calibri size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Then 2 classes&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0in 0in 0pt 1in;TEXT-INDENT:-0.25in;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Calibri size=3&gt;a.&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Object with two public members that where of type System.Object&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN:0in 0in 0pt 1in;TEXT-INDENT:-0.25in;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Calibri size=3&gt;b.&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Generic with two public members that were generic types&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;using System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;using System.Collections.Generic;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;using System.Text;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;namespace ObjectVSGenerics {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;class Program {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static void Main(string[] args) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;RunTest(Console.ReadKey().Key);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Console.ReadLine();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;private static void RunTest(System.ConsoleKey key) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Int64 start = DateTime.Now.Ticks;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;for (int i = 0; i &amp;lt;= 1000000; i++) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;if (key == ConsoleKey.O) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Obj o = new Obj(1, 1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;int objInt = o.sum();//(int)o.obj1 + (int)o.obj2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} else if (key == ConsoleKey.G) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Gen&amp;lt;int, int&amp;gt; g = new Gen&amp;lt;int, int&amp;gt;(1, 1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;int genInt = g.t + g.u;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Int64 processingSeconds = (DateTime.Now.Ticks - start) / TimeSpan.TicksPerMillisecond;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Console.WriteLine(" Process time in Milliseconds " + key.ToString() + ": " + (processingSeconds).ToString());&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Console.Write("Enter another: ");&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;RunTest(Console.ReadKey().Key);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:8pt;LINE-HEIGHT:115%;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face=Calibri size=3&gt;This is what I found:&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT:medium none;BORDER-TOP:medium none;BORDER-LEFT:medium none;BORDER-BOTTOM:medium none;BORDER-COLLAPSE:collapse;" cellSpacing=0 cellPadding=0 class="MsoTableGrid"&gt;

&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:black 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:black 1pt solid;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;Build / Framework&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:black 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;Generic mean exec time&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:black 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;Object mean exec time&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:black 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;% Efficiency&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:black 1pt solid;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;Debug .net 2.0&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;32ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;77ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;58% (Generic)&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:black 1pt solid;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;Debug .net 3.0&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;33ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;78ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;57% (Generic)&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:black 1pt solid;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;Debug .net 3.5&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;33ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;80ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;59% (Generic)&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:black 1pt solid;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;Release .net 2.0&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;15ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;64ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;76.5% (Generic)&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:black 1pt solid;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;Release .net 3.0&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;15ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;58ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;74% (Generic)&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:black 1pt solid;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;Release .net 3.5&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;15ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;57ms&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:black 1pt solid;PADDING-RIGHT:5.4pt;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;WIDTH:119.7pt;PADDING-TOP:0in;BORDER-BOTTOM:black 1pt solid;BACKGROUND-COLOR:transparent;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;FONT face=Calibri size=3&gt;74% (Generic)&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face=Calibri size=3&gt;Now, while I was not able to reproduce Tony’s findings and the scenario above was not a “real world” scenario (looping and instantiating an object or generic 1 million times in a given execution) I was able to conclude a few things:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;"&gt;&lt;SPAN style="FONT-FAMILY:Symbol;"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;The efficiency of the generic was higher than the object, and the efficiency of both were higher when executing Release code.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;It makes total sense why a release build would be faster, especially regarding recursion (the framework is less aggressive about cleaning up resources in debug code, plus other optimizations).&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;However, why did the object stay close to the same execution mean and the generic become roughly 50% faster?&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0in 0in 0pt 1in;TEXT-INDENT:-0.25in;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;o&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Check out this &lt;A class="" title=post href="http://blogs.msdn.com/csharpfaq/archive/2004/03/12/88913.aspx%20" target=_blank&gt;post&lt;/A&gt; &lt;/FONT&gt;&lt;FONT face=Calibri size=3&gt;by the C# team.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Basically this improvement is because the actual implementation is created at runtime. So when I create Gen&amp;lt;int, int&amp;gt; the JIT will see if it has previously been compiled and if it has will reuse it.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Secondly the Object implementation will always require boxing and unboxing of the value type int – that simply will not change, Release or not.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;"&gt;&lt;SPAN style="FONT-FAMILY:Symbol;"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;In this &lt;A class="" title=book href="http://www.amazon.com/gp/product/0735622779/northruporg/%20" target=_blank&gt;book&lt;/A&gt; Tony points out that a really good reason to use Generics is simply because they are type-safe.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Meaning that during compilation if a value you’re providing to your generic does not match the instantiated instance’s definition the compiler will error.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Generic code is only valid if it will compile every possible instance of the generic.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;"&gt;&lt;SPAN style="FONT-FAMILY:Symbol;"&gt;&lt;SPAN&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Finally, if you notice in the code above I created a method in the Object class to encapsulate the “sum” functionality.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Normally, you probably would not do this because when dealing with objects - you’re already running the risk of no type safety during runtime.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;But to make a point – Generics cannot perform this sort of encapsulation; operators cannot be used as logic mechanisms.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;When generic code is compiled it maintains its “generic-ness.” Therefore anything that would explicitly require a certain type will not compile.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face=Calibri size=3&gt;The bottom-line is “real-world” forces you to use all of the tools in your tool bag, not just the cool ones.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;We love adopting new technologies at Fellowship Technologies; we have to ride the razor’s edge to be able to evaluate and use the best that is out there so that we can build the best.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;Generics seem to have a pretty significant advantage over objects and casting - it's a tool, I think, that has the possibility of make some solid, clean, and fast code.&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face=Calibri size=3&gt;--nick&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://experience.fellowshipone.com/aggbug.aspx?PostID=9176" width="1" height="1"&gt;</description><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Technology/default.aspx">Technology</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/development/default.aspx">development</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Code/default.aspx">Code</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Generics/default.aspx">Generics</category></item><item><title>Innovating with MVC in ASP.NET</title><link>http://experience.fellowshipone.com/blogs/intelligentdesign/archive/2007/11/01/innovating-with-mvc-in-asp-net.aspx</link><pubDate>Thu, 01 Nov 2007 00:55:00 GMT</pubDate><guid isPermaLink="false">87eee960-b871-44cb-8a98-02588a960c04:8964</guid><dc:creator>FTProductDev</dc:creator><slash:comments>0</slash:comments><comments>http://experience.fellowshipone.com/blogs/intelligentdesign/comments/8964.aspx</comments><wfw:commentRss>http://experience.fellowshipone.com/blogs/intelligentdesign/commentrss.aspx?PostID=8964</wfw:commentRss><description>&lt;P&gt;If you were following our blog at the end of last year, you read my entry on MVC -&amp;nbsp;&lt;A class="" href="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/2006/09/22/Enterprise-.NET-architecture.aspx"&gt;Wrestling an Enterprise Architecture out of .NET&lt;/A&gt;.&amp;nbsp; Well, we pressed forward and developed a fully-working MVC2 architecture on top of ASP.NET.&amp;nbsp; We've had some bumps along the way, but we think it's been worth&amp;nbsp;the effort&amp;nbsp;to move to an MVC2 architecture.&amp;nbsp; The benefit of moving the majority of your application's logic into controllers cannot be overstated.&amp;nbsp; Testing and API extensibility are just a couple of the huge benefits.&amp;nbsp; We said as much to Scott Guthrie in an email conversation at the beginning of this year, and asked why Microsoft didn't address this architectural need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;We were very pleased to hear that Microsoft is going to do just that with their &lt;A class="" href="http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx"&gt;MVC framework in ASP.NET&lt;/A&gt;, and it feels good to know we were ahead of the curve.&amp;nbsp; Matt Vasquez and I also had the honor of attending a Software Design Review of MVC and some other technologies, along with about 20 others, in Redmond last week.&amp;nbsp; It was a great event, with tons of info on upcoming technologies and some good conversations with the developers.&amp;nbsp; Not to mention the fact that a thirty second question to Scott Guthrie after dinner solved a problem that our development team has spent at least a collective 24 hours trying to figure out.&amp;nbsp; While everything covered in the SDR is under a non-disclosure, suffice it to say that we're excited about this new MVC support from Microsoft.&amp;nbsp;&amp;nbsp;Our home-grown architecture is very legitimized by what we saw.&amp;nbsp; We're very close to what they've developed, but I'm sure we'll be able to use a lot of what they're creating to more cleanly handle what we had to hack onto ASP.NET.&amp;nbsp; It's also exciting to be able to influence the development of this new framework.&amp;nbsp; I plan on cranking some code from the SDR bits starting this weekend and giving lots of juicy feedback.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I pray that all our customers know that we place a great deal of importance on innovation.&amp;nbsp; It's a high priority for us to innovate both&amp;nbsp;our architecture and our processes to improve our product, and we aren't afraid to go to the lengths necessary to align our development with future-thinking choices.&amp;nbsp; It takes a pioneering spirit to not only see where technology needs to go, but to also take the effort/time/risk to move in that direction.&amp;nbsp; This past year, we moved to the Agile process of &lt;A class="" href="http://en.wikipedia.org/wiki/Scrum_(development)"&gt;Scrum&lt;/A&gt; and created our own MVC architecture on top of ASP.NET.&amp;nbsp; All of our new development now adhears to the MVC pattern (MVC2 if you want to be specific).&amp;nbsp; God has given us a pioneering spirit, and we're excited about where He's leading us.&lt;/P&gt;
&lt;P&gt;thardy&lt;/P&gt;&lt;img src="http://experience.fellowshipone.com/aggbug.aspx?PostID=8964" width="1" height="1"&gt;</description><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/MVC/default.aspx">MVC</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Framework/default.aspx">Framework</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Scrum/default.aspx">Scrum</category></item></channel></rss>