<?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: StringBuilder vs. String</title>
	<atom:link href="http://chaoticjava.com/posts/stringbuilder-vs-string/feed/" rel="self" type="application/rss+xml" />
	<link>http://chaoticjava.com/posts/stringbuilder-vs-string/</link>
	<description>The internet, design patterns, frameworks and Java</description>
	<lastBuildDate>Sat, 05 Nov 2011 18:39:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Javin @ HashMap vs Hashtable in Java</title>
		<link>http://chaoticjava.com/posts/stringbuilder-vs-string/comment-page-1/#comment-126177</link>
		<dc:creator>Javin @ HashMap vs Hashtable in Java</dc:creator>
		<pubDate>Fri, 15 Apr 2011 13:13:33 +0000</pubDate>
		<guid isPermaLink="false">http://javachaos.crazyredpanda.com/?p=131#comment-126177</guid>
		<description>Nice article . you may want to check &lt;a href=&quot;http://javarevisited.blogspot.com/2010/10/why-string-is-immutable-in-java.html&quot; rel=&quot;nofollow&quot;&gt;String is immutable in Java&lt;/a&gt; as well.</description>
		<content:encoded><![CDATA[<p>Nice article . you may want to check <a href="http://javarevisited.blogspot.com/2010/10/why-string-is-immutable-in-java.html" rel="nofollow">String is immutable in Java</a> as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cristian Vrabie</title>
		<link>http://chaoticjava.com/posts/stringbuilder-vs-string/comment-page-1/#comment-45786</link>
		<dc:creator>Cristian Vrabie</dc:creator>
		<pubDate>Fri, 16 Jan 2009 13:15:50 +0000</pubDate>
		<guid isPermaLink="false">http://javachaos.crazyredpanda.com/?p=131#comment-45786</guid>
		<description>I did some quick testing: http://cristianvrabie.blogspot.com/2009/01/stringbuilder-vs-string.html
Let&#039;s say I&#039;ve been blown away:

# Runs    String     StringBuilder
10           0            0
100         2            0
1,000      37           0
10,000    15888     3
10,0000   ---          49

*times are in milliseconds</description>
		<content:encoded><![CDATA[<p>I did some quick testing: <a href="http://cristianvrabie.blogspot.com/2009/01/stringbuilder-vs-string.html" rel="nofollow">http://cristianvrabie.blogspot.com/2009/01/stringbuilder-vs-string.html</a><br />
Let&#8217;s say I&#8217;ve been blown away:</p>
<p># Runs    String     StringBuilder<br />
10           0            0<br />
100         2            0<br />
1,000      37           0<br />
10,000    15888     3<br />
10,0000   &#8212;          49</p>
<p>*times are in milliseconds</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avah</title>
		<link>http://chaoticjava.com/posts/stringbuilder-vs-string/comment-page-1/#comment-14403</link>
		<dc:creator>Avah</dc:creator>
		<pubDate>Fri, 02 Nov 2007 04:05:19 +0000</pubDate>
		<guid isPermaLink="false">http://javachaos.crazyredpanda.com/?p=131#comment-14403</guid>
		<description>Joe7Pak: Yes, definitely! The only problem there is the need to pre-allocate 256 characters, but if you know that your target-string is going to be approximately that size, it&#039;s worth it!</description>
		<content:encoded><![CDATA[<p>Joe7Pak: Yes, definitely! The only problem there is the need to pre-allocate 256 characters, but if you know that your target-string is going to be approximately that size, it&#8217;s worth it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe7Pak</title>
		<link>http://chaoticjava.com/posts/stringbuilder-vs-string/comment-page-1/#comment-14374</link>
		<dc:creator>Joe7Pak</dc:creator>
		<pubDate>Thu, 01 Nov 2007 21:34:01 +0000</pubDate>
		<guid isPermaLink="false">http://javachaos.crazyredpanda.com/?p=131#comment-14374</guid>
		<description>Just a thought - 

I&#039;m looking in the docs ( for 6.0, don&#039;t know if anything has changed since 5.0 ) and it says that the default ctor for StringBuilder has a buffer of 16 chars. Could it be that if you make the buffer bigger, say, 256 or 512, that you wouldn&#039;t see new StringBuilders being built nearly as much?</description>
		<content:encoded><![CDATA[<p>Just a thought &#8211; </p>
<p>I&#8217;m looking in the docs ( for 6.0, don&#8217;t know if anything has changed since 5.0 ) and it says that the default ctor for StringBuilder has a buffer of 16 chars. Could it be that if you make the buffer bigger, say, 256 or 512, that you wouldn&#8217;t see new StringBuilders being built nearly as much?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avah</title>
		<link>http://chaoticjava.com/posts/stringbuilder-vs-string/comment-page-1/#comment-293</link>
		<dc:creator>Avah</dc:creator>
		<pubDate>Thu, 30 Mar 2006 18:33:15 +0000</pubDate>
		<guid isPermaLink="false">http://javachaos.crazyredpanda.com/?p=131#comment-293</guid>
		<description>Thank you!

To get the disassembled code, use the javap tool:

javap -c &lt;i&gt;qualified class name&lt;/i&gt;</description>
		<content:encoded><![CDATA[<p>Thank you!</p>
<p>To get the disassembled code, use the javap tool:</p>
<p>javap -c <i>qualified class name</i></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ahmed Hashim</title>
		<link>http://chaoticjava.com/posts/stringbuilder-vs-string/comment-page-1/#comment-292</link>
		<dc:creator>Ahmed Hashim</dc:creator>
		<pubDate>Thu, 30 Mar 2006 08:20:20 +0000</pubDate>
		<guid isPermaLink="false">http://javachaos.crazyredpanda.com/?p=131#comment-292</guid>
		<description>I was going on to make a Test Script to measure the effect of loading 1 MB file using String concatenation while looping on the file rather than using StringBuffer appending. But I think you did a good job here.:)

BTW how did you make the disassembled code?

Thanks</description>
		<content:encoded><![CDATA[<p>I was going on to make a Test Script to measure the effect of loading 1 MB file using String concatenation while looping on the file rather than using StringBuffer appending. But I think you did a good job here.:)</p>
<p>BTW how did you make the disassembled code?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandy McArthur</title>
		<link>http://chaoticjava.com/posts/stringbuilder-vs-string/comment-page-1/#comment-253</link>
		<dc:creator>Sandy McArthur</dc:creator>
		<pubDate>Fri, 17 Feb 2006 05:41:47 +0000</pubDate>
		<guid isPermaLink="false">http://javachaos.crazyredpanda.com/?p=131#comment-253</guid>
		<description>The sort version is if you are joining Strings across many statements, use StringBuilder  (or StringBuffer). If you can join Strings in one statement, save your time and use the + operator.</description>
		<content:encoded><![CDATA[<p>The sort version is if you are joining Strings across many statements, use StringBuilder  (or StringBuffer). If you can join Strings in one statement, save your time and use the + operator.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

