<?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: .net String vs. StringBuilder &#8211; concatenation performance</title>
	<atom:link href="http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/</link>
	<description>Jouni Heikniemi&#039;s IT adventures</description>
	<lastBuildDate>Fri, 10 Feb 2012 02:59:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: subhash</title>
		<link>http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/comment-page-1/#comment-44</link>
		<dc:creator>subhash</dc:creator>
		<pubDate>Wed, 16 Apr 2008 14:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/#comment-44</guid>
		<description>how Strings useful than the StringBuffer
</description>
		<content:encoded><![CDATA[<p>how Strings useful than the StringBuffer</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rahul Patil</title>
		<link>http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/comment-page-1/#comment-43</link>
		<dc:creator>Rahul Patil</dc:creator>
		<pubDate>Mon, 14 Apr 2008 09:36:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/#comment-43</guid>
		<description>good article.
but clear differences are not given.
point #1: If the new resulting string wouldn&#039;t fit into the buffer, a new buffer is allocated and the old contents are moved in. In no case new objects need to be created.
is not differentiating stringbuilder with string cause in case of string class also this thing happens.
so clear differentiation must be given
</description>
		<content:encoded><![CDATA[<p>good article.<br />
but clear differences are not given.<br />
point #1: If the new resulting string wouldn&#039;t fit into the buffer, a new buffer is allocated and the old contents are moved in. In no case new objects need to be created.<br />
is not differentiating stringbuilder with string cause in case of string class also this thing happens.<br />
so clear differentiation must be given</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nachi</title>
		<link>http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/comment-page-1/#comment-42</link>
		<dc:creator>Nachi</dc:creator>
		<pubDate>Fri, 04 Jan 2008 05:33:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/#comment-42</guid>
		<description>Nice Article an useful one.
</description>
		<content:encoded><![CDATA[<p>Nice Article an useful one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Cumps</title>
		<link>http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/comment-page-1/#comment-41</link>
		<dc:creator>David Cumps</dc:creator>
		<pubDate>Sun, 16 Sep 2007 17:49:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/#comment-41</guid>
		<description>I&#039;ve taken the liberty to do some additional testing into the memory usage of various methods.
Might be useful: http://blog.cumps.be/string-concatenation-vs-memory-allocation/
</description>
		<content:encoded><![CDATA[<p>I&#039;ve taken the liberty to do some additional testing into the memory usage of various methods.<br />
Might be useful: <a href="http://blog.cumps.be/string-concatenation-vs-memory-allocation/" rel="nofollow">http://blog.cumps.be/string-concatenation-vs-memory-allocation/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/comment-page-1/#comment-40</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 10 Aug 2007 02:57:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/#comment-40</guid>
		<description>Entry form garbled the pasted code, second try:
for (int j = 0; j  0;)
sargs[i] = s2;
String.Concat(sargs);
}
</description>
		<content:encoded><![CDATA[<p>Entry form garbled the pasted code, second try:<br />
for (int j = 0; j  0;)<br />
sargs[i] = s2;<br />
String.Concat(sargs);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/comment-page-1/#comment-39</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 10 Aug 2007 02:50:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/#comment-39</guid>
		<description>Nobody should be using single concats over a bounded list of strings.  Consider that most concatenations are bounded and in those cases StringBuilder cannot ever perform better than String.Concat().  The concat code above is flawed in thinking that one would use single concats over and over.  Compare the StringBuilder code with this version of concat:
for (int j = 0; j  0;)
sargs[i] = s2;
String.Concat(sargs);
}
This concat runs almost twice as fast as StringBuilder at any loop count.  And this is not just true of loops, as long as the counts are bounded, Concat is always faster.
There are definitely times when you should use StringBuilder, but general concatenation of strings is not one of them - no matter the number of strings being concatenated.
</description>
		<content:encoded><![CDATA[<p>Nobody should be using single concats over a bounded list of strings.  Consider that most concatenations are bounded and in those cases StringBuilder cannot ever perform better than String.Concat().  The concat code above is flawed in thinking that one would use single concats over and over.  Compare the StringBuilder code with this version of concat:<br />
for (int j = 0; j  0;)<br />
sargs[i] = s2;<br />
String.Concat(sargs);<br />
}<br />
This concat runs almost twice as fast as StringBuilder at any loop count.  And this is not just true of loops, as long as the counts are bounded, Concat is always faster.<br />
There are definitely times when you should use StringBuilder, but general concatenation of strings is not one of them &#8211; no matter the number of strings being concatenated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Bateman</title>
		<link>http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/comment-page-1/#comment-38</link>
		<dc:creator>Scott Bateman</dc:creator>
		<pubDate>Sat, 04 Aug 2007 04:25:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/#comment-38</guid>
		<description>Agreed that there are certain situations where the StringBuilder is useful, but in general I think it is not necessary and probably overused by most developers.
Check out my reasoning here:
http://codeslammer.wordpress.com/2007/07/07/do-not-use-the-stringbuilder/
</description>
		<content:encoded><![CDATA[<p>Agreed that there are certain situations where the StringBuilder is useful, but in general I think it is not necessary and probably overused by most developers.<br />
Check out my reasoning here:<br />
<a href="http://codeslammer.wordpress.com/2007/07/07/do-not-use-the-stringbuilder/" rel="nofollow">http://codeslammer.wordpress.com/2007/07/07/do-not-use-the-stringbuilder/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nupur nag</title>
		<link>http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/comment-page-1/#comment-37</link>
		<dc:creator>nupur nag</dc:creator>
		<pubDate>Wed, 06 Jun 2007 13:11:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/#comment-37</guid>
		<description>sir,
How to concatenate different values of buttons i a single textbox in C#.net
</description>
		<content:encoded><![CDATA[<p>sir,<br />
How to concatenate different values of buttons i a single textbox in C#.net</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Monica</title>
		<link>http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/comment-page-1/#comment-36</link>
		<dc:creator>Monica</dc:creator>
		<pubDate>Wed, 14 Mar 2007 12:27:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/#comment-36</guid>
		<description>Thanks so much for this--I had an app that was doing a large number of concatenations.  In this case I knew what the final string length would be.  I preset the starting capacity on all the stringbuilders used in the app--it actually visibly improved speed!
</description>
		<content:encoded><![CDATA[<p>Thanks so much for this&#8211;I had an app that was doing a large number of concatenations.  In this case I knew what the final string length would be.  I preset the starting capacity on all the stringbuilders used in the app&#8211;it actually visibly improved speed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nirbhay Kumar Singh</title>
		<link>http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/comment-page-1/#comment-35</link>
		<dc:creator>Nirbhay Kumar Singh</dc:creator>
		<pubDate>Mon, 05 Mar 2007 07:43:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.heikniemi.net/hardcoded/2004/08/net-string-vs-stringbuilder-concatenation-performance/#comment-35</guid>
		<description>This is the very very excelent way of comparission between string and stringbuilder
</description>
		<content:encoded><![CDATA[<p>This is the very very excelent way of comparission between string and stringbuilder</p>
]]></content:encoded>
	</item>
</channel>
</rss>

