<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Performance Quiz #3</title><link>http://blogs.msdn.com/ricom/archive/2004/06/25/performance-quiz-3.aspx</link><description>The funny thing about managed code is that sometimes people forget that just because we offer an easy/convenient way to do things if you're doing a quick RAD application doesn't mean that the RAD way is in fact the right way. In fact, the good old fashioned</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Performance Quiz #3</title><link>http://blogs.msdn.com/ricom/archive/2004/06/25/performance-quiz-3.aspx#166444</link><pubDate>Sat, 26 Jun 2004 00:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:166444</guid><dc:creator>Marco Russo</dc:creator><description>The RAD parser creates 16 new string for each line. If you have 2,500 lines, there are 40,000 new strings created that has to be collected by GC. Not to count the 2,5000 arrays you creates just to feed the foreach loop.&lt;br&gt;In terms of speed, there are possibly two bottlenecks: the String.Split method and the Int32.Parse method. I hadn't checked with a profiler how much it is. GC isn't a heavy load on my tests.&lt;br&gt;Anyway, I prefer to use the RAD source code unless the performance impact of the parser become a real bottleneck in a real application.... :-)</description></item><item><title>Parser Differences</title><link>http://blogs.msdn.com/ricom/archive/2004/06/25/performance-quiz-3.aspx#166507</link><pubDate>Sat, 26 Jun 2004 03:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:166507</guid><dc:creator>Rico Mariani</dc:creator><description>Some people have pointed out that the two parsers don't parse exactly the same thing.  This is of course correct -- the 2nd parser is somewhat simplified compared to the first.  I did this largely in the interest of keeping the source code small and somewhat understandable.&lt;br&gt;&lt;br&gt;One of the things I plan to discuss in the analysis is the complexity/correctness part of the trade-off.&lt;br&gt;&lt;br&gt;However it is worth noting that tightening or widening the accepted strings of the 2nd parser would not materially affect its performance characteristics so for purposes of this analysis what is there is fairly representantive.</description></item><item><title>re: Performance Quiz #3</title><link>http://blogs.msdn.com/ricom/archive/2004/06/25/performance-quiz-3.aspx#168207</link><pubDate>Tue, 29 Jun 2004 00:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:168207</guid><dc:creator>Ryan Lamansky (Kardax)</dc:creator><description>It's also worth mentioning that the second approach is almost free of function calls.&lt;br&gt;&lt;br&gt;One of the important performance risks of calling into an API (particularly a closed-source one) is that you have no idea what it does to get your results, but you can have some assurance that it's not specially optimized for what you're doing.&lt;br&gt;&lt;br&gt;Since the whole &amp;quot;problem&amp;quot; is closed, the JIT could (theoretically) optimize all the extra stuff away, but it'll be a long time before we see a JIT that powerful :)</description></item><item><title>Performance Quiz #3 -- Solution</title><link>http://blogs.msdn.com/ricom/archive/2004/06/25/performance-quiz-3.aspx#169184</link><pubDate>Wed, 30 Jun 2004 01:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:169184</guid><dc:creator>Rico Mariani's WebLog</dc:creator><description /></item></channel></rss>