
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: String vs StringBuilder for the .NET Concatenation Performance Championship</title>
	<atom:link href="http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/</link>
	<description>On the infinite search for the silver bullet...</description>
	<lastBuildDate>Fri, 12 Mar 2010 21:06:47 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Siddharth</title>
		<link>http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/comment-page-1/#comment-1371</link>
		<dc:creator>Siddharth</dc:creator>
		<pubDate>Sat, 21 Mar 2009 03:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/#comment-1371</guid>
		<description>Thanks a ton for this. I am making an app and needed to preprocess a 6GB text log. It had to be output back to a file about 250 MB in size. Using Stringbuilder instead of Strings cut down the time about 10 times.</description>
		<content:encoded><![CDATA[<p>Thanks a ton for this. I am making an app and needed to preprocess a 6GB text log. It had to be output back to a file about 250 MB in size. Using Stringbuilder instead of Strings cut down the time about 10 times.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shyam</title>
		<link>http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/comment-page-1/#comment-751</link>
		<dc:creator>Shyam</dc:creator>
		<pubDate>Wed, 10 Sep 2008 17:21:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/#comment-751</guid>
		<description>Thats a good one....</description>
		<content:encoded><![CDATA[<p>Thats a good one&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nilsson</title>
		<link>http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/comment-page-1/#comment-680</link>
		<dc:creator>Robert Nilsson</dc:creator>
		<pubDate>Fri, 29 Aug 2008 13:44:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/#comment-680</guid>
		<description>Mike; using your above code will produce the following crap for the garbage collector to handle:

&quot;foofoofoo1foofoo1foo2foofoo1foo2foo3foofoo1foo2foo3foo4&quot;

This is bcause when concatinating strings every instance of the previous (concatenated) string is removed by the garbage collector, producing alot of crap for the framework to handle. Many websites that produce dynamicaly created html with string concatenation (i.e a menu-trees etc) and has a visitor load of a couple of thousands every day may cause the webserver to freeze entirely for minutes before the garbage collector manages to clean out all old string objects. These hickups can be avoided by using a stringbuilder object instead (which in size would be 1/4 of your string example when disposed).
This is performance at another level; not just &quot;runtime&quot; performance...</description>
		<content:encoded><![CDATA[<p>Mike; using your above code will produce the following crap for the garbage collector to handle:</p>
<p>&#8220;foofoofoo1foofoo1foo2foofoo1foo2foo3foofoo1foo2foo3foo4&#8243;</p>
<p>This is bcause when concatinating strings every instance of the previous (concatenated) string is removed by the garbage collector, producing alot of crap for the framework to handle. Many websites that produce dynamicaly created html with string concatenation (i.e a menu-trees etc) and has a visitor load of a couple of thousands every day may cause the webserver to freeze entirely for minutes before the garbage collector manages to clean out all old string objects. These hickups can be avoided by using a stringbuilder object instead (which in size would be 1/4 of your string example when disposed).<br />
This is performance at another level; not just &#8220;runtime&#8221; performance&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Griffin</title>
		<link>http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/comment-page-1/#comment-232</link>
		<dc:creator>Mike Griffin</dc:creator>
		<pubDate>Fri, 25 Apr 2008 15:32:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/#comment-232</guid>
		<description>First, you really should correct the mistake in the opening line of your post. Second, you are wrong.

do this:

s += &quot;foo&quot; + &quot;foo1&quot; + &quot;foo2&quot; + &quot;foo3&quot; + &quot;foo4&quot;;

And see what IL code is executed. We&#039;ve done the timings too and never use StringBuilder for anything what so ever ....</description>
		<content:encoded><![CDATA[<p>First, you really should correct the mistake in the opening line of your post. Second, you are wrong.</p>
<p>do this:</p>
<p>s += &#8220;foo&#8221; + &#8220;foo1&#8243; + &#8220;foo2&#8243; + &#8220;foo3&#8243; + &#8220;foo4&#8243;;</p>
<p>And see what IL code is executed. We&#8217;ve done the timings too and never use StringBuilder for anything what so ever &#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: String vs StringBuilder - [assembly: AssemblyTitle(&#34;U Can C Sharp 2.0&#34;)]</title>
		<link>http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/comment-page-1/#comment-134</link>
		<dc:creator>String vs StringBuilder - [assembly: AssemblyTitle(&#34;U Can C Sharp 2.0&#34;)]</dc:creator>
		<pubDate>Thu, 07 Feb 2008 08:16:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.briandicroce.com/2008/02/04/stringbuilder-vs-string-performance-in-net/#comment-134</guid>
		<description>[...] végre egy &quot;független&quot;&#160;tesztet, ahol pontosan ezt a kérdést boncolgatták -&#160;itt olvashatjátok.  Published 2008. február 6. 22:17 by F&#252;l&#246;p D&#225;vid Filed under: [...]</description>
		<content:encoded><![CDATA[<p>[...] végre egy &quot;független&quot;&nbsp;tesztet, ahol pontosan ezt a kérdést boncolgatták -&nbsp;itt olvashatjátok.  Published 2008. február 6. 22:17 by F&#252;l&#246;p D&#225;vid Filed under: [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
