<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Olaf's thoughts about Delphi, IntraWeb and other dev stuff  - Latest Comments in Delphi 2009: TStringBuilder (Recap and Benchmark)</title><link>http://omonien.disqus.com/</link><description>Delphi Programming, .NET Philosophy, Web development and more …</description><atom:link href="https://omonien.disqus.com/olafs_thoughts_about_development_delphi_2009_tstringbuilder/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 15 Dec 2010 12:30:26 -0000</lastBuildDate><item><title>Re: Delphi 2009: TStringBuilder (Recap and Benchmark)</title><link>http://www.monien.net/delphi-2009-tstringbuilder/#comment-112315313</link><description>&lt;p&gt;hi Worked great for me with Delphi 2007 on Windows 7 to fix this annoying problem. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eczema Treatments</dc:creator><pubDate>Wed, 15 Dec 2010 12:30:26 -0000</pubDate></item><item><title>Re: Delphi 2009: TStringBuilder (Recap and Benchmark)</title><link>http://www.monien.net/delphi-2009-tstringbuilder/#comment-3089977</link><description>&lt;p&gt;You're actually hitting a corner case of TStringBuilder here, in practice it'll be slower, but of speed comparable to String. And you don't need to benchmarks, artificial or not to know that: you just need to look at the implementation.&lt;br&gt;TStringBuilder is implemented around a dynamic array, meaning that it's performance is going to be in the same ballpark as Strings, as the VCL internals for growth and data copy are the same. Differences are going to come from the overhead of the respective function calls.&lt;/p&gt;&lt;p&gt;Incidentally this means String will win (all the time) against TStringBuilder whenever you concat more than one string at once (s:=s+s1+s2+...), because the RTL has a function for that (which will realloc only once), whereas TStringBuilder doesn't.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric</dc:creator><pubDate>Thu, 16 Oct 2008 11:37:54 -0000</pubDate></item><item><title>Re: Delphi 2009: TStringBuilder (Recap and Benchmark)</title><link>http://www.monien.net/delphi-2009-tstringbuilder/#comment-3061150</link><description>&lt;p&gt;{$StringChecks OFF} seems to have very little Influence for me. I've added the full DPR file in the post above&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Olaf Monien</dc:creator><pubDate>Wed, 15 Oct 2008 03:33:14 -0000</pubDate></item><item><title>Re: Delphi 2009: TStringBuilder (Recap and Benchmark)</title><link>http://www.monien.net/delphi-2009-tstringbuilder/#comment-3061123</link><description>&lt;p&gt;I did test this with kind of similar code but with stringchecks set to off and appending bigger strings At it turns out that StringBuilder is slower than normal operations...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Binis</dc:creator><pubDate>Wed, 15 Oct 2008 03:26:05 -0000</pubDate></item><item><title>Re: Delphi 2009: TStringBuilder (Recap and Benchmark)</title><link>http://www.monien.net/delphi-2009-tstringbuilder/#comment-3060990</link><description>&lt;p&gt;Strictly speaking, with the stringbuilder, you also need to get the final result inside your benchmark, in order to achieve the same results as the second benchmark.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lars D</dc:creator><pubDate>Wed, 15 Oct 2008 02:47:37 -0000</pubDate></item><item><title>Re: Delphi 2009: TStringBuilder (Recap and Benchmark)</title><link>http://www.monien.net/delphi-2009-tstringbuilder/#comment-3041294</link><description>&lt;p&gt;That replace advantage is indeed interesting.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Olaf Monien</dc:creator><pubDate>Tue, 14 Oct 2008 10:29:53 -0000</pubDate></item><item><title>Re: Delphi 2009: TStringBuilder (Recap and Benchmark)</title><link>http://www.monien.net/delphi-2009-tstringbuilder/#comment-3040851</link><description>&lt;p&gt;I'm kind of a broken record on this, but I'm happy for the addition for better code compatibility between Delphi in Win32 and .Net.  Particularly for library code that is intended to be used everywhere.  Even though I'm still stinging a little about losing VCL.Net.&lt;/p&gt;&lt;p&gt;Another example; TStringBuilder.Replace is about 3 times faster than StringReplace.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bruce McGee</dc:creator><pubDate>Tue, 14 Oct 2008 09:55:41 -0000</pubDate></item></channel></rss>