<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 Forums - Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Forums/rss"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 Forums - Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<link>http://channel9.msdn.com/Forums</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Forums</link>
	<language>en</language>
	<pubDate>Sat, 25 May 2013 08:41:04 GMT</pubDate>
	<lastBuildDate>Sat, 25 May 2013 08:41:04 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>24</c9:totalResults>
	<c9:pageCount>-24</c9:pageCount>
	<c9:pageSize>-1</c9:pageSize>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>We know that his working on a managed code base, that's several millions of lines long of managed code ... that can beat the pants off any native programming environment ...</p><p>SHOW ME THIS &quot;MANAGED&quot; NIRVANA <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p><p><a href="http://www.bluebytesoftware.com/blog/2012/10/31/BewareTheString.aspx">http://www.bluebytesoftware.com/blog/2012/10/31/BewareTheString.aspx</a></p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/46e41e2addea4ae887f0a10f00b57c5a#46e41e2addea4ae887f0a10f00b57c5a</link>
		<pubDate>Tue, 20 Nov 2012 11:00:46 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/46e41e2addea4ae887f0a10f00b57c5a#46e41e2addea4ae887f0a10f00b57c5a</guid>
		<dc:creator>LiquidBoy</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/LiquidBoy/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p><em>from: <a href="http://www.bluebytesoftware.com/blog/2012/10/31/BewareTheString.aspx">http://www.bluebytesoftware.com/blog/2012/10/31/BewareTheString.aspx</a></em></p><p><em>I've been working in an environment where performance is critical, and everything is managed code, for several years now.&nbsp; That might sound like an oxymoron, but our system can in fact beat the pants off all the popular native programming environments.&nbsp; The key to success?&nbsp; Thought and discipline.</em></p><p><em>...</em></p><p><em>The moral of the story?&nbsp; Love your single string type.&nbsp; It's a wonderful thing.&nbsp; But always remember: An allocation is an allocation; make sure you can afford it.&nbsp; Gen0 collections aren't free, and software written to assume they are is easily detectible.&nbsp; String.Split allocates an array and a substring for each element within; there's almost always a better way.</em></p><p>It looks like Joe Duffy is &quot;<em>the architecture of an experimental OS's developer platform,&nbsp;where he is also chief architect of its programming language.</em>&quot; So that means he's talking about his own managed nirvana ~ which means you have to get your answers from him, correct?</p><p>The bit about string parsing and avoiding allocation is common sense put into elegant code to great effect, nice.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/f73551e0e9814cddb722a10f00e2301e#f73551e0e9814cddb722a10f00e2301e</link>
		<pubDate>Tue, 20 Nov 2012 13:43:31 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/f73551e0e9814cddb722a10f00e2301e#f73551e0e9814cddb722a10f00e2301e</guid>
		<dc:creator>JohnAskew</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/JohnAskew/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/46e41e2addea4ae887f0a10f00b57c5a">4 hours&nbsp;ago</a>, <a href="/Niners/LiquidBoy">LiquidBoy</a> wrote</p><p>We know that his working on a managed code base, that's several millions of lines long of managed code ... that can beat the pants off any native programming environment ...</p><p>SHOW ME THIS &quot;MANAGED&quot; NIRVANA <img src="http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9" alt="Smiley"></p><p><a href="http://www.bluebytesoftware.com/blog/2012/10/31/BewareTheString.aspx">http://www.bluebytesoftware.com/blog/2012/10/31/BewareTheString.aspx</a></p><p>&nbsp;</p><p></p></div></blockquote><p></p><p>I ran his examples and going by index is a heck of a lot slower than using the Split function, at least for one run of each.</p><p>First 0.0007529</p><p>Second 0.0024157</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/4c730027a12347c291a1a10f00fda1f3#4c730027a12347c291a1a10f00fda1f3</link>
		<pubDate>Tue, 20 Nov 2012 15:23:26 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/4c730027a12347c291a1a10f00fda1f3#4c730027a12347c291a1a10f00fda1f3</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/4c730027a12347c291a1a10f00fda1f3">11 minutes&nbsp;ago</a>, <a href="/Niners/spivonious">spivonious</a> wrote</p><p>*snip*</p><p>I ran his examples and going by index is a heck of a lot slower than using the Split function, at least for one run of each.</p><p>First 0.0007529</p><p>Second 0.0024157</p><p></p></div></blockquote><p></p><p>* How many runs are you doing of each.</p><p>* What resolution timer are you using.</p><p>* How are you ensuring that you aren't being biased by .NET startup costs or static constructors getting in the way?</p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/48efa1aa710e4881b036a10f01027b7a#48efa1aa710e4881b036a10f01027b7a</link>
		<pubDate>Tue, 20 Nov 2012 15:41:06 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/48efa1aa710e4881b036a10f01027b7a#48efa1aa710e4881b036a10f01027b7a</guid>
		<dc:creator>evildictaitor</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/evildictaitor/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments#c48efa1aa710e4881b036a10f01027b7a">evildictaitor</a>: Just one run, and a string with only 5 delimited members. Using .NET Stopwatch. Running both tests consecutively in a console app.</p><p>I did change it run each 1000 times and the Split method did take twice as long as the index method. Still, &quot;premature optimization...&quot;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/55ee89ea27a945328b42a10f01087cca#55ee89ea27a945328b42a10f01087cca</link>
		<pubDate>Tue, 20 Nov 2012 16:02:58 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/55ee89ea27a945328b42a10f01087cca#55ee89ea27a945328b42a10f01087cca</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>Also I call shenanigans:</p><p></p><blockquote><div class="quoteText"><p></p><p>If this is, say, parsing HTTP headers on a heavily loaded server, you bet it's going to make a noticeable difference.</p><p></p></div></blockquote><p></p><p>Not unless your GC sucks a55 it won't. I've ran servers on microchips that eat strings for breakfast. If he's struggling with strings causing too many collections his code is already so far past wrong that it's unreal. And servers are always a bad example for performance junkies to talk about. Network latency&nbsp;<em>always</em>&nbsp;dwarfs the cost of the GC, and are a great thing for attackers to attack and suffer really badly from memory fragmentation. So they are in fact&nbsp;<em>ideal&nbsp;</em>candidates to be made into managed code with a full blown GC behind them.<em><br></em></p><p>In fact, the .NET GC is specifically designed to cope with large numbers of collections of dead small objects. And whilst he says gen-zero collections aren't free, he's missing the point that the cost is proportional to the number of live objects, not the number of dead ones, and so they're a whole lot freer than he thinks they are.</p><p>In fact, GC's gcalloc is faster than malloc, calloc and new in C&#43;&#43;, and in the case where they don't trigger a full collect, are only marginally more expensive than a stack allocate, mainly due to the fact that it'll call a constructor and clear the contents of your memory</p><p></p><blockquote><div class="quoteText"><p></p><p>Crank up .NET's XmlReader and profile loading a modest XML document. You'll be surprised to see that allocations during parsing add up to approximately 4X the document's size. Many of these are strings. How did we end up in such a place? Presumably because whoever wrote these abstractions fell trap to the fallacy that &quot;gen0 collections are free.&quot; But also because layers upon layers of such things lie beneath.</p><p></p></div></blockquote><p></p><p>I think, actually, that Joe has fallen into the fallacy that XML is a suitable solution for a high performance project. If you're storing your data as XML, you better suck up the fact that your data is in a human readable rather than a machine efficient storage format and that getting data out of it probably shouldn't be in a hot loop (and if it's not in a hot loop, why do you care about its performance?)</p><p>The writer of the XmlReader probably realized this, and therefore (correctly) assumed that optimising the XmlReader for the side-case of someone loading it on a microchip who really cares about gen0 collections is optimising for the wrong case. I'll put money on the writer of the XmlReader class wanting to write code that is correct, easy to use, easy to read and easy to fix when the XML spec changes in future, rather than wanting to optimise away all of the almost-free allocs in the code.</p><p>In fact, I challenge Joe Duffy to find an implementation of an XmlReader on&nbsp;<em>a native</em>&nbsp;platform (like C/C&#43;&#43;) that is complete with regards to the XML spec and contains no short-lived allocations.</p><p></p><blockquote><div class="quoteText"><p></p><div class="itemBodyStyle"><p>It doesn't have to be this way. String does, after all, have an indexer. And it's type-safe! So in-place parsing at least won't lead to buffer overruns. Sadly, I have concluded that few people, at least in the context of .NET, will write efficient string parsing code.</p><p></p></div></div></blockquote><p></p><p>Which is good. People writing &quot;efficient&quot; string parsing code in C&#43;&#43; often get it wrong and write hard-to-read code. C# is an &quot;algorithm-orientated&quot; rather than a &quot;performance-orientated&quot; language.</p><p>In fact, having non-mutable strings gives huge benefits to C# compared with C&#43;&#43;. It enables a ton of optimisations such as&nbsp;aggressive&nbsp;inlining of functions and makes parallelism and atomicity easier to achieve. It also means that if you have a string as a private member, you can hand it back to a caller by reference safe in the knowledge that they can't mash the content of it, leading to state corruption or even security holes. In C&#43;&#43; you can only get this kind of&nbsp;guarantee&nbsp;by copying the string, which means an expensive and fragmentary malloc/new followed by exactly the thing that Joe despises - a full string copy into the newly allocated buffer.</p><p></p><blockquote><div class="quoteText"><p></p><p>The whole platform is written to assume that strings are available, and does not have an efficient representation of a transient substring</p><p></p></div></blockquote><p></p><p>In does, in fact, have an&nbsp;efficient&nbsp;representation of a transient substring; System.StringBuilder is exactly the class that Joe Duffy seems to love so much. It allows inplace modification of strings and uses a single underlying array of chars with a length field.</p><p>Truncating a System.StringBuilder requires no internal memory copies or allocates, so Joe will be very happy to know that he can continue to use .NET without all of those gen0 collections ruining his day.</p><p></p><blockquote><div class="quoteText"><p></p><p>And of course the APIs have been designed to coax you into making copy after copy, rather than doing efficient text manipulation in place. Hell, even the HTTP and ASP.NET web stacks are rife with such inefficiencies.</p><p></p></div></blockquote><p></p><p>And yet they outperform most of their native competitors. Go figure.</p><p></p><blockquote><div class="quoteText"><p></p><p>I suppose it's possible to ignore all of this and let the GC chew up 30% or more of your program's execution time without anybody noticing. I'm baffled that such software is written, but at the same time I realize that my expectations are out of whack with respect to common practice.</p><p></p></div></blockquote><p></p><p>I think if Joe Duffy's code is spending 30% of its time in the GC, then he should probably stop calling GC.Collect() in a while(true) loop.</p><p>Don't get me wrong, it's possible to write inefficient code in C#. But programs are usually tanked not by the garbage collector, but by dreadful algorithms. If joe spent half as much time converting his bubble sorts into quick sorts and arranging his code to efficiently store and compute results, he'd probably find that the GC really is the least of his problems.</p><p>Complaining about the performance of the .NET GC usually comes from a misunderstanding about what C# is compared with C&#43;&#43;, how the GC works, and fundamentally the difference between high performant versus low performant code.</p><p>If you think your code is slow, my advice is to&nbsp;<em>benchmark</em>&nbsp;it. Usually your CPU isn't spending very much time in the GC at all, but spending all of it's time waiting on locks or hotlooping through shoddy algorithms, and that code would be slow whether you write it in C# or Haskell or C&#43;&#43;.</p><p>gen0 collections might not be free, but they are cheap. Writing shoddy code to avoid them is likely to make your code worse, hide real performance bottlenecks and lead to subtle sometimes catastrophic problems with your code.</p><p>So anyway, I call shenanigans.</p><div></div>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/d78ab9e23cf741ca9f1ca10f010b4121#d78ab9e23cf741ca9f1ca10f010b4121</link>
		<pubDate>Tue, 20 Nov 2012 16:13:02 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/d78ab9e23cf741ca9f1ca10f010b4121#d78ab9e23cf741ca9f1ca10f010b4121</guid>
		<dc:creator>evildictaitor</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/evildictaitor/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/55ee89ea27a945328b42a10f01087cca">9 minutes&nbsp;ago</a>, <a href="/Niners/spivonious">spivonious</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments#c48efa1aa710e4881b036a10f01027b7a">evildictaitor</a>: Just one run, and a string with only 5 delimited members. Using .NET Stopwatch. Running both tests consecutively in a console app.</p><p>I did change it run each 1000 times and the Split method did take twice as long as the index method. Still, &quot;premature optimization...&quot;</p><p></p></div></blockquote><p></p><p>I believe the point of the article&nbsp;was to show how inefficient parsing methods can trigger frequent collections that eventually add up. If you want to see that in action, both 1 and 1000 are off by several orders of magnitude.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/a1ca2486a9da458db7e1a10f011251c2#a1ca2486a9da458db7e1a10f011251c2</link>
		<pubDate>Tue, 20 Nov 2012 16:38:45 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/a1ca2486a9da458db7e1a10f011251c2#a1ca2486a9da458db7e1a10f011251c2</guid>
		<dc:creator>Blue Ink</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Blue Ink/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments#c46e41e2addea4ae887f0a10f00b57c5a">LiquidBoy</a>:</p><p>I don't see code one to be that bad. Sure it takes more memory, but it is done only one time. There is one extra indirection though.</p><p>problem is, it gets worse if you repeat split down the road.</p><p>it is not something to do with managed vs unmanaged. You get the same problem with any language. Anyway, a side note, it should get an array of indexs on code two. You can get shallow call stack and multithreading for doing that.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/bfa2e3f9dc5940668555a10f011be1a4#bfa2e3f9dc5940668555a10f011be1a4</link>
		<pubDate>Tue, 20 Nov 2012 17:13:34 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/bfa2e3f9dc5940668555a10f011be1a4#bfa2e3f9dc5940668555a10f011be1a4</guid>
		<dc:creator>magicalclick</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/magicalclick/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments#cd78ab9e23cf741ca9f1ca10f010b4121">evildictaitor</a>: &#43;1</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/2f6e62e03ff34b59943da10f011da5d0#2f6e62e03ff34b59943da10f011da5d0</link>
		<pubDate>Tue, 20 Nov 2012 17:20:00 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/2f6e62e03ff34b59943da10f011da5d0#2f6e62e03ff34b59943da10f011da5d0</guid>
		<dc:creator>Blue Ink</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Blue Ink/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>@<a href="http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments#cd78ab9e23cf741ca9f1ca10f010b4121">evildictaitor</a>: &#43;2&nbsp;&nbsp;&nbsp; I like your explanation and theories much better.&nbsp; You know your stuff better than Duffy.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/7af84e640a8643b0af1ca10f012828aa#7af84e640a8643b0af1ca10f012828aa</link>
		<pubDate>Tue, 20 Nov 2012 17:58:16 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/7af84e640a8643b0af1ca10f012828aa#7af84e640a8643b0af1ca10f012828aa</guid>
		<dc:creator>TexasToast</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/TexasToast/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>Definetely sounds like evildicator knows his stuff, not questioning that. BUT I do agree with Joe Duffy as well with the overuse of split normally for massive dynamic strings and almost always with a collection of strings.. Lots of .NET devs, including myself,&nbsp;are very poor optimized programmers as Joe hints at..</p><p>Regardless I also know that Joe and his team is probably working on Midori and the SingularityOS project, that several millions of lines of managed code on a managed os.</p><p>Anyway I found some stats of Singularity, of how it improves across the board on certain OS system cycles ... Some of you may find it interesting :</p><p>&nbsp;</p><p><a href="http://channel9.msdn.com/Forums/Coffeehouse/The-Singularity-Project-with-results">http://channel9.msdn.com/Forums/Coffeehouse/The-Singularity-Project-with-results</a></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/7a7b8a326ba64fbb9700a10f013a7190#7a7b8a326ba64fbb9700a10f013a7190</link>
		<pubDate>Tue, 20 Nov 2012 19:04:51 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/7a7b8a326ba64fbb9700a10f013a7190#7a7b8a326ba64fbb9700a10f013a7190</guid>
		<dc:creator>LiquidBoy</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/LiquidBoy/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>His 30% GC time does sound excessively high. I've done experiments with incredibly string-processing heavy algorithms (lots of string.Split usage, among other things), and that spent about 10% of its runtime in the GC.</p><p>However, that was on Mono, before the introduction of the sgen GC (their old&nbsp;GC is not generational and will stop the world for every collection). So&nbsp;I find it hard to believe that .Net's much better optimized generational GC would ever use 30% of the execution time, unless your code is monumentally bad.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/8032cc03cd434b618d64a1100009f90e#8032cc03cd434b618d64a1100009f90e</link>
		<pubDate>Wed, 21 Nov 2012 00:36:18 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/8032cc03cd434b618d64a1100009f90e#8032cc03cd434b618d64a1100009f90e</guid>
		<dc:creator>Sven Groot</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Sven Groot/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments#c46e41e2addea4ae887f0a10f00b57c5a">LiquidBoy</a>:</p><p>&nbsp;</p><p>btw, code 2 won't compile. There is no substr defined. I can't be sure he didn't allocate extra substr when it is not defined nor assigned in his code.</p><p>problem with code one is mostly bloated memory usage when the same style is used down the deep call stack.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/07d0347acf194b9c95b4a11000219067#07d0347acf194b9c95b4a11000219067</link>
		<pubDate>Wed, 21 Nov 2012 02:02:12 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/07d0347acf194b9c95b4a11000219067#07d0347acf194b9c95b4a11000219067</guid>
		<dc:creator>magicalclick</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/magicalclick/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>&nbsp;</p><p><em>&quot;Honestly, I've witnessed programs that should be I/O bound turn into programs that are compute-bound, simply due to use of inefficient string parsing routines across <strong>enormous amounts of data</strong>.&nbsp; <strong>(Okay, the developers also did other sloppy allocation-heavy things, but string certainly contributed.)&nbsp;&quot;</strong></em></p><p>&nbsp;</p><p>I certainly believe it.&nbsp; He said 30% in an off-hand way; that is possible, imho, under the conditions described, particularly those in <strong>bold</strong>, quoted above.&nbsp; I work on a high-performance server, and not that long ago, there was a cache related bug causing the cache refresh worker to constantly run, never finishing and locking the cache during recalculation of the hashes.&nbsp; The GC was running forever, because of a circular dependency between two handlers creating a massive amount of strings - XSLT/XML stuff.</p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/3a2a362185c7419bb775a1100033f95a#3a2a362185c7419bb775a1100033f95a</link>
		<pubDate>Wed, 21 Nov 2012 03:09:13 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/3a2a362185c7419bb775a1100033f95a#3a2a362185c7419bb775a1100033f95a</guid>
		<dc:creator>Richard Anthony Hein</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Richard.Hein/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/d78ab9e23cf741ca9f1ca10f010b4121">11 hours&nbsp;ago</a>, <a href="/Niners/evildictaitor">evildictait​or</a> wrote</p><p>I think, actually, that Joe has fallen into the fallacy that XML is a suitable solution for a high performance project. If you're storing your data as XML, you better suck up the fact that your data is in a human readable rather than a machine efficient storage format and that getting data out of it probably shouldn't be in a hot loop (and if it's not in a hot loop, why do you care about its performance?)</p><p>The writer of the XmlReader probably realized this, and therefore (correctly) assumed that optimising the XmlReader for the side-case of someone loading it on a microchip who really cares about gen0 collections is optimising for the wrong case. I'll put money on the writer of the XmlReader class wanting to write code that is correct, easy to use, easy to read and easy to fix when the XML spec changes in future, rather than wanting to optimise away all of the almost-free allocs in the code.</p><p>In fact, I challenge Joe Duffy to find an implementation of an XmlReader on&nbsp;<em>a native</em>&nbsp;platform (like C/C&#43;&#43;) that is complete with regards to the XML spec and contains no short-lived allocations.</p><p></p></div></blockquote><p></p><p>Indeed. If you want to write your own XMLReader, you have to take care of the parsing difficulty introduced by flexibility of XML format. Or you'd be&nbsp;just introducing a fixed text-based format that looks like XML.</p><p>And because .NET string are reference based&nbsp;pooled strings, unlike unmanaged&nbsp;C&#43;&#43; where one string means one buffer. I think the actually allocation occured may not be as bad as he predicts. Of course, we need a test to confirm this.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/8883b3e516a74a7d847da1100041fb1f#8883b3e516a74a7d847da1100041fb1f</link>
		<pubDate>Wed, 21 Nov 2012 04:00:13 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/8883b3e516a74a7d847da1100041fb1f#8883b3e516a74a7d847da1100041fb1f</guid>
		<dc:creator>cheong</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cheong/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/3a2a362185c7419bb775a1100033f95a">5 hours&nbsp;ago</a>, <a href="/Niners/Richard.Hein">Richard.Hein</a> wrote&nbsp;</p><p>I work on a high-performance server ... XSLT/XML stuff.</p><p></p></div></blockquote><p></p><p>I think I found your problem.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/d3f85cdf0b9d4098bc4ca1100096b79c#d3f85cdf0b9d4098bc4ca1100096b79c</link>
		<pubDate>Wed, 21 Nov 2012 09:08:44 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/d3f85cdf0b9d4098bc4ca1100096b79c#d3f85cdf0b9d4098bc4ca1100096b79c</guid>
		<dc:creator>evildictaitor</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/evildictaitor/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments#cd3f85cdf0b9d4098bc4ca1100096b79c">evildictaitor</a>: Out of interest, what do you recommend instead of XML in high perf systems : binary serialisation? Json?</p><p>Herbie</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/24ee04dce0474f0d80eaa1100099125a#24ee04dce0474f0d80eaa1100099125a</link>
		<pubDate>Wed, 21 Nov 2012 09:17:19 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/24ee04dce0474f0d80eaa1100099125a#24ee04dce0474f0d80eaa1100099125a</guid>
		<dc:creator>Herbie Smith</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Dr Herbie/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>I love my string type, it's called std::wstring</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/afbe2330c7354637a085a11000a45421#afbe2330c7354637a085a11000a45421</link>
		<pubDate>Wed, 21 Nov 2012 09:58:18 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/afbe2330c7354637a085a11000a45421#afbe2330c7354637a085a11000a45421</guid>
		<dc:creator>Ion Todirel</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Ion Todirel/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/24ee04dce0474f0d80eaa1100099125a">1 hour&nbsp;ago</a>, <a href="/Niners/Dr%20Herbie">Dr Herbie</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments#cd3f85cdf0b9d4098bc4ca1100096b79c">evildictaitor</a>: Out of interest, what do you recommend instead of XML in high perf systems : binary serialisation? Json?</p><p>Herbie</p><p></p></div></blockquote><p></p><p>It depends what you mean by a high performance system, and what you're storing in the XML.</p><p>But basically, if you're using your XML to store stuff like configuration options, I'd say keep the XML but parse the file during the startup of your server (or during a config flush) and keep the pertinent data in memory. That way you avoid doing XML operations during the hot loop of your high-perf server.</p><p>If your XML is not so much about configs, but more about data storage, something more like SQL server is probably going to be a good choice. Just remember to parameterize all of your statements and put the parameter strings as constants in the SQL database as stored functions - not only will that protect you from SQL injections, it'll also mean that your queries get precompiled in SQL and that you'll get a massive reduction in the transmission cost between your app and the SQL server, be it an in-proc SQL server, a SQL server on the same machine via a pipe or even one on a different machine.</p><p>Also it depends on if your high performance server, is in fact, an IO-bound server rather than a CPU bound one.</p><p>For example, if you're using a GPU farm to compute results for a massive simulation like a weather modelling or modelling explosions (a high performance server) then doing XML ops during a hot loop is going to completely destroy your performance. But if you're actually dealing mainly with perhaps 1000 HTTP requests an hour on a webserver, then really you're not a high performance server at all, but just a regular one, and doing a whole ton of XML per page probably isn't going to hurt you.</p><p>If you're really asking about whether XML versus JSON is a good <em>output&nbsp;</em>of the server, (e.g. webservices / SOAP / REST server) then the thing to bear in mind is that the cost of doing XML memory operations is nothing compared with the cost of pumping those bytes around the world over the Interwebs. JSON will give you a speed boost not because it has fewer string operations or because it is easier to parse, but simply because it is smaller and will take fewer packets to send it from your server to a browser or vice-versa.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/cd379a9c24034677a440a11000b28c19#cd379a9c24034677a440a11000b28c19</link>
		<pubDate>Wed, 21 Nov 2012 10:50:04 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/cd379a9c24034677a440a11000b28c19#cd379a9c24034677a440a11000b28c19</guid>
		<dc:creator>evildictaitor</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/evildictaitor/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments#ccd379a9c24034677a440a11000b28c19">evildictaitor</a>: You did not say that <strong>binary serialization</strong> is preferred for 'a massive simulation like weather modelling or modelling explosions'. Why not?</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/02461491a4cb497fb4bea11000e5c4dd#02461491a4cb497fb4bea11000e5c4dd</link>
		<pubDate>Wed, 21 Nov 2012 13:56:33 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/02461491a4cb497fb4bea11000e5c4dd#02461491a4cb497fb4bea11000e5c4dd</guid>
		<dc:creator>JohnAskew</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/JohnAskew/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/02461491a4cb497fb4bea11000e5c4dd">45 minutes&nbsp;ago</a>, <a href="/Niners/JohnAskew">JohnAskew</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments#ccd379a9c24034677a440a11000b28c19">evildictaitor</a>: You did not say that <strong>binary serialization</strong> is preferred for 'a massive simulation like weather modelling or modelling explosions'. Why not?</p><p></p></div></blockquote><p></p><p>Because for hot loops of massive simulations, serialization of any kind should be avoided. If you really have a requirement like a massive simulation, you need to think really carefully about what data it is that you&nbsp;<em>need</em><em>&nbsp;to send</em>&nbsp;and then think carefully about how to send that set sensibly to the other side.</p><p>For example, if you're a games company shoving 60 frames a second over the wire, then XML is a really bad choice for getting those pixels over. And if you're running a cluster for climate modelling, frankly just keeping all of the intermediate data in memory rather than writing it to disk at all will probably lower the amount of CO2 you're pumping into your climate.</p><p>If you're writing a lot of persistent data out (like data in a HFT trading server or people's XY coordinates in a game server) then a SQL database is probably the best way to go. SQL databases have the benefit of being simulteniously a binary serialized form of the data as well as being pretty optimised for fast transactions. It's also nice that unlike customized binary marshallers, it's usually pretty easy to just dive in to a SQL database to add, remove and query the data, hence avoiding a lot of the nastyness that comes with custom binary formats.</p><p>Binary serialization also means different things to different people as well, which is why I tried to avoid mentioning it. The .NET &quot;binary serializer&quot; is has performance frankly not much better than XML for reading/writing, but direct marshalling of data via C structures is outrageously efficient, even if it does destroy your chances of ever being able to modify that data manually or manage binary&nbsp;compatibility&nbsp;with previous versions of your own software.</p><p>Some binary formats are also really nasty and inefficient to parse; ASN1 is perhaps one of the greatest examples of an industry-standard binary serialization that is large, cumbersome, hard to parse, hard to query and inefficient to manipulate. Frankly XML beats the pants off ASN1 most days of the week.</p><p>But in short - XML is great, but just not for parsing in a hot loop of a high performance application like a game's render loop or a climate modelling cluster. When you're in a hot loop there isn't a one-size fits all solution. You need to engage your brain in order to squeeze extra performance out, and think about what you actually need to do in your hot loop, and what could be precomputed, offloaded or computed more efficiently to speed up your hot loop.<em><br></em></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/53bb8e4ae20c4b798b19a11000f4f8cb#53bb8e4ae20c4b798b19a11000f4f8cb</link>
		<pubDate>Wed, 21 Nov 2012 14:51:54 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/53bb8e4ae20c4b798b19a11000f4f8cb#53bb8e4ae20c4b798b19a11000f4f8cb</guid>
		<dc:creator>evildictaitor</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/evildictaitor/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/d3f85cdf0b9d4098bc4ca1100096b79c">6 hours&nbsp;ago</a>, <a href="/Niners/evildictaitor">evildictait​or</a> wrote</p><p>*snip*</p><p>I think I found your problem.</p><p></p></div></blockquote><p></p><p>LOL, but take it in context ... actually mentioning XSLT/XML probably confuses the issue - it's not really about XML per se.&nbsp; Users have the option of using JSON as well, and in that case the performance would have degraded slower, but would have still degraded eventually.&nbsp; Essentially, there is a pipeline, configured via web.config, which determines the components that should process the data.&nbsp; There was a loop created because the users had configured the first component to process the data, pass that to the 2nd, which passes it to the 1st ... etc....&nbsp; So, bad coding/configuration was the real culprit, but it also highlighted just how many strings were being created during these processing stages.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/2fb93a56902e4077a2a6a1100103bce3#2fb93a56902e4077a2a6a1100103bce3</link>
		<pubDate>Wed, 21 Nov 2012 15:45:40 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/2fb93a56902e4077a2a6a1100103bce3#2fb93a56902e4077a2a6a1100103bce3</guid>
		<dc:creator>Richard Anthony Hein</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Richard.Hein/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/2fb93a56902e4077a2a6a1100103bce3">38 minutes&nbsp;ago</a>, <a href="/Niners/Richard.Hein">Richard.Hein</a> wrote</p><p>*snip*</p><p>LOL, but take it in context ... actually mentioning XSLT/XML probably confuses the issue - it's not really about XML per se.&nbsp; Users have the option of using JSON as well, and in that case the performance would have degraded slower, but would have still degraded eventually.&nbsp; Essentially, there is a pipeline, configured via web.config, which determines the components that should process the data.&nbsp; There was a loop created because the users had configured the first component to process the data, pass that to the 2nd, which passes it to the 1st ... etc....&nbsp; So, bad coding/configuration was the real culprit, but it also highlighted just how many strings were being created during these processing stages.</p><p></p></div></blockquote><p></p><p>Not wanting to be snobbish about it, but an ASP.NET server serving webpages is&nbsp;<em>not&nbsp;</em>a high performance server.</p><p>The main speed increase you'll get by switching to JSON from XML has nothing to do with the parsing complexity of the XmlReader or the gen0 collections; but rather will be entirely down to the fact that JSON is smaller on the wire and sending a few extra TCP packets round the globe is going to dwarf any of those minor CPU costs. Hell, a single undelivered TCP packet costs upwards of 40ms to NACK and respond, which is fast enough for my computer to allocate about 33874715&nbsp;string allocations on my machine, and my machine can do roughly 2800 GC.Collect(3)s in that amount of time too, or 18000 GC.Collect(1)s in that amount of time.</p><p>Yes, the GC and string allocates are not free. But on web-servers, the different is negligable. It's like we're arguing about whether the reason the bridge fell down is because of atom vibrations in sodium atoms in the pillars.</p><p>The vibrations are there, but that's not why the bridge fell down. It's more likely that you just built the bridge wrong than that the sodium atoms just went all crazy on your bridge.</p><p>These discussions always feel like developers going out of their way to blame someone other than themselves for their shoddy code. If they just fix the code (or for heaven's sake, just&nbsp;<em>benchmark</em> it) they'll find out that 99.999999999999999% of the time, the reason their code is slow is because it's slow code that they've written.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/4bf41ccf766f4a2fb026a110011084e0#4bf41ccf766f4a2fb026a110011084e0</link>
		<pubDate>Wed, 21 Nov 2012 16:32:12 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/4bf41ccf766f4a2fb026a110011084e0#4bf41ccf766f4a2fb026a110011084e0</guid>
		<dc:creator>evildictaitor</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/evildictaitor/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Joe Duffy : a &quot;managed&quot; system ... beat the pants off all the popular native programming environments</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/d78ab9e23cf741ca9f1ca10f010b4121">1 day&nbsp;ago</a>, <a href="/Niners/evildictaitor">evildictait​or</a> wrote</p><p>Also I call shenanigans:</p><p>*snip*</p><p>I think, actually, that Joe has fallen into the fallacy that XML is a suitable solution for a high performance project.&nbsp;</p><p></p></div></blockquote><p></p><p>Simple observation ... maybe Joe just cares about performance of library software. As a library writer his decisions impacts a lot of other software, whether written with performance in mind or not. How can you not like that mentality insofar as it does not deteriorate correctness.</p><p>As for the further development of the XML syntax some people think it is already unnecessarily complicated. The W3C normally creates new syntax &quot;around&quot; XML, like with XML NS, XLink, etc. I'm looking more forward to broad <a href="http://www.w3.org/TR/exi/">EXI</a> support; not that EXI looks simple but it has some desirable characteristics besides abolishing the human-readability aspect to XML; in the mean-time the &quot;zipped XML&quot; design pattern is mainstream.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/14b7c864d3ab4c9492d3a110018298fc#14b7c864d3ab4c9492d3a110018298fc</link>
		<pubDate>Wed, 21 Nov 2012 23:27:33 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Joe-Duffy--a-managed-system--beat-the-pants-off-all-the-popular-native-programming-environments/14b7c864d3ab4c9492d3a110018298fc#14b7c864d3ab4c9492d3a110018298fc</guid>
		<dc:creator>Bent Rasmussen</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/exoteric/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>