<?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: Delphi 2009 &#8211; StringPerformance Redux</title>
	<atom:link href="http://www.deltics.co.nz/blog/Index.php?feed=rss2&#038;p=375" rel="self" type="application/rss+xml" />
	<link>http://www.deltics.co.nz/blog/?p=375</link>
	<description>Keeping Delphi afloat in Aotearoa</description>
	<lastBuildDate>Fri, 03 Sep 2010 13:44:08 +1200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Don&#8217;t Get Hung Up on Milliseconds - Micro-ISV.asia</title>
		<link>http://www.deltics.co.nz/blog/?p=375&#038;cpage=1#comment-388</link>
		<dc:creator>Don&#8217;t Get Hung Up on Milliseconds - Micro-ISV.asia</dc:creator>
		<pubDate>Mon, 06 Oct 2008 10:27:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.deltics.co.nz/blog/?p=375#comment-388</guid>
		<description>[...] Artificial benchmarks are largely meaningless. The fact that he posted a follow-up article that gives different results on the same tests, because he made some changes to his benchmarking [...]</description>
		<content:encoded><![CDATA[<p>[...] Artificial benchmarks are largely meaningless. The fact that he posted a follow-up article that gives different results on the same tests, because he made some changes to his benchmarking [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jolyon Smith</title>
		<link>http://www.deltics.co.nz/blog/?p=375&#038;cpage=1#comment-293</link>
		<dc:creator>Jolyon Smith</dc:creator>
		<pubDate>Tue, 23 Sep 2008 21:09:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.deltics.co.nz/blog/?p=375#comment-293</guid>
		<description>@Per - I can&#039;t really answer either question.

I don&#039;t know what you know about .NET so I can&#039;t know whether I know something you don&#039;t know, cos I don&#039;t know if you don&#039;t know it or not.  But if I did know that I knew something that you didn&#039;t know, then self-evidently I must able to tell that, so being simultaneously in a state where-at I could not tell would create an internal paradox and I would consequently most likely disappear in a puff of logic.

;)

But you only have to look at recent indications from CodeGear themselves that future Delphi.NET releases will not be so concerned with compatibility with Delphi.Win32 and will be more focused on leveraging the latest and greatest .NET technologies.

That in itself is very interesting, no?

Whatever else I may - or may not - know.

:)</description>
		<content:encoded><![CDATA[<p>@Per &#8211; I can&#8217;t really answer either question.</p>
<p>I don&#8217;t know what you know about .NET so I can&#8217;t know whether I know something you don&#8217;t know, cos I don&#8217;t know if you don&#8217;t know it or not.  But if I did know that I knew something that you didn&#8217;t know, then self-evidently I must able to tell that, so being simultaneously in a state where-at I could not tell would create an internal paradox and I would consequently most likely disappear in a puff of logic.</p>
<p> <img src='http://www.deltics.co.nz/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>But you only have to look at recent indications from CodeGear themselves that future Delphi.NET releases will not be so concerned with compatibility with Delphi.Win32 and will be more focused on leveraging the latest and greatest .NET technologies.</p>
<p>That in itself is very interesting, no?</p>
<p>Whatever else I may &#8211; or may not &#8211; know.</p>
<p> <img src='http://www.deltics.co.nz/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per Bakkendorff</title>
		<link>http://www.deltics.co.nz/blog/?p=375&#038;cpage=1#comment-290</link>
		<dc:creator>Per Bakkendorff</dc:creator>
		<pubDate>Tue, 23 Sep 2008 18:53:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.deltics.co.nz/blog/?p=375#comment-290</guid>
		<description>@Jolyon - do you know something about the .NET version that I don&#039;t ?
Naa, and if you did, you couldn&#039;t tell, right ? :)</description>
		<content:encoded><![CDATA[<p>@Jolyon &#8211; do you know something about the .NET version that I don&#8217;t ?<br />
Naa, and if you did, you couldn&#8217;t tell, right ? <img src='http://www.deltics.co.nz/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jolyon Smith</title>
		<link>http://www.deltics.co.nz/blog/?p=375&#038;cpage=1#comment-283</link>
		<dc:creator>Jolyon Smith</dc:creator>
		<pubDate>Mon, 22 Sep 2008 21:12:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.deltics.co.nz/blog/?p=375#comment-283</guid>
		<description>@Bruce - I also think there are very interesting times ahead on the .NET side of things...  very interesting indeed. And in a good way.  :)


@Kashmi - I once had the same thought and created my own string builder-like class a while ago specifically to handle specialised cases that I thought could be optimised.  e.g. building a delimited list from a known set of elements, where the resulting string size could be pre-calculated and pre-set and then the contents placed directly into the resulting string buffer.

Intuitively this should give some improvement in performance.

In reality I found that the expected performance gains were simply not realised, and performance was actually worse than building the string up using regular concatenation.

I didn&#039;t analyse it too closely.  I put it down to the fact that using a class to encapsulate this stuff necessarily introduces it&#039;s own overhead (method calls vs - i.e. on top of - RTL code as well the construction and destruction of the class itself etc).


@Daniel (Luyo) - I haven&#039;t compared EXE sizes and I think doing so is a little tricky as it isn&#039;t possible to compare a Delphi 2009 ANSI executable with a Delphi 2009 Unicode one since of course the former is not possible to produce.  We could only compare a 2009 exe with a pre-2009 exe and I think there are too many other factors involved between versions for such a comparison to provide any useful measure of the impact in this area of Unicode specifically.


@Kryvich - Thanks.  I feel these results have a more &quot;truthy&quot; feel about them too.  :)</description>
		<content:encoded><![CDATA[<p>@Bruce &#8211; I also think there are very interesting times ahead on the .NET side of things&#8230;  very interesting indeed. And in a good way.  <img src='http://www.deltics.co.nz/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>@Kashmi &#8211; I once had the same thought and created my own string builder-like class a while ago specifically to handle specialised cases that I thought could be optimised.  e.g. building a delimited list from a known set of elements, where the resulting string size could be pre-calculated and pre-set and then the contents placed directly into the resulting string buffer.</p>
<p>Intuitively this should give some improvement in performance.</p>
<p>In reality I found that the expected performance gains were simply not realised, and performance was actually worse than building the string up using regular concatenation.</p>
<p>I didn&#8217;t analyse it too closely.  I put it down to the fact that using a class to encapsulate this stuff necessarily introduces it&#8217;s own overhead (method calls vs &#8211; i.e. on top of &#8211; RTL code as well the construction and destruction of the class itself etc).</p>
<p>@Daniel (Luyo) &#8211; I haven&#8217;t compared EXE sizes and I think doing so is a little tricky as it isn&#8217;t possible to compare a Delphi 2009 ANSI executable with a Delphi 2009 Unicode one since of course the former is not possible to produce.  We could only compare a 2009 exe with a pre-2009 exe and I think there are too many other factors involved between versions for such a comparison to provide any useful measure of the impact in this area of Unicode specifically.</p>
<p>@Kryvich &#8211; Thanks.  I feel these results have a more &#8220;truthy&#8221; feel about them too.  <img src='http://www.deltics.co.nz/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Lehmann</title>
		<link>http://www.deltics.co.nz/blog/?p=375&#038;cpage=1#comment-282</link>
		<dc:creator>Daniel Lehmann</dc:creator>
		<pubDate>Mon, 22 Sep 2008 17:02:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.deltics.co.nz/blog/?p=375#comment-282</guid>
		<description>Yes that chart is great :-) Thanks a lot for your efforts!</description>
		<content:encoded><![CDATA[<p>Yes that chart is great <img src='http://www.deltics.co.nz/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Thanks a lot for your efforts!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kryvich</title>
		<link>http://www.deltics.co.nz/blog/?p=375&#038;cpage=1#comment-280</link>
		<dc:creator>Kryvich</dc:creator>
		<pubDate>Mon, 22 Sep 2008 15:50:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.deltics.co.nz/blog/?p=375#comment-280</guid>
		<description>@Jolyon. OK, now I trust your results. :) Thanks!

@Bruce - Apparently you&#039;re right about TStringBuilder. But I think this class can be significantly improved on the Win32 side, and it can be even more efficient than the String type in many cases.</description>
		<content:encoded><![CDATA[<p>@Jolyon. OK, now I trust your results. <img src='http://www.deltics.co.nz/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thanks!</p>
<p>@Bruce &#8211; Apparently you&#8217;re right about TStringBuilder. But I think this class can be significantly improved on the Win32 side, and it can be even more efficient than the String type in many cases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Luyo</title>
		<link>http://www.deltics.co.nz/blog/?p=375&#038;cpage=1#comment-279</link>
		<dc:creator>Daniel Luyo</dc:creator>
		<pubDate>Mon, 22 Sep 2008 15:04:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.deltics.co.nz/blog/?p=375#comment-279</guid>
		<description>Nice!

A side question, is a Unicode exe bigger that a non Unicode one?, how much?</description>
		<content:encoded><![CDATA[<p>Nice!</p>
<p>A side question, is a Unicode exe bigger that a non Unicode one?, how much?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mikeg</title>
		<link>http://www.deltics.co.nz/blog/?p=375&#038;cpage=1#comment-278</link>
		<dc:creator>mikeg</dc:creator>
		<pubDate>Mon, 22 Sep 2008 13:53:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.deltics.co.nz/blog/?p=375#comment-278</guid>
		<description>Regarding the StringBuilder - AFAIK, the reason it was introduced in .net was not (directly) a performance, but rather the unsuitability of the .net memory manager for frequent small changes in the strings (i.e., changes in their sizes). Indirectly this, of course, affects the performance too.

I don&#039;t know, how far this affects Delphi and its memory manager, and could this be interpreted as preparations to introduction of garbage collection in Delphi.</description>
		<content:encoded><![CDATA[<p>Regarding the StringBuilder &#8211; AFAIK, the reason it was introduced in .net was not (directly) a performance, but rather the unsuitability of the .net memory manager for frequent small changes in the strings (i.e., changes in their sizes). Indirectly this, of course, affects the performance too.</p>
<p>I don&#8217;t know, how far this affects Delphi and its memory manager, and could this be interpreted as preparations to introduction of garbage collection in Delphi.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kashmi</title>
		<link>http://www.deltics.co.nz/blog/?p=375&#038;cpage=1#comment-277</link>
		<dc:creator>kashmi</dc:creator>
		<pubDate>Mon, 22 Sep 2008 13:44:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.deltics.co.nz/blog/?p=375#comment-277</guid>
		<description>Mmm, shouldn&#039;t TStringBuilder be used in the following way to achive actual performance benefits:

  1) Create builder instance
  2) Set builder Capacity, either as the real predicted size of the future string or just as a big enough amount.
  3) Now use convenient Add... methods 
  4) Get your result string.

Actually this way you&#039;re preallocating memory, preventing its reallocations during additions. And this way you&#039;re using nice methods instead of using SetLength(Result...) and manipulating with Result string or using a memory stream.</description>
		<content:encoded><![CDATA[<p>Mmm, shouldn&#8217;t TStringBuilder be used in the following way to achive actual performance benefits:</p>
<p>  1) Create builder instance<br />
  2) Set builder Capacity, either as the real predicted size of the future string or just as a big enough amount.<br />
  3) Now use convenient Add&#8230; methods<br />
  4) Get your result string.</p>
<p>Actually this way you&#8217;re preallocating memory, preventing its reallocations during additions. And this way you&#8217;re using nice methods instead of using SetLength(Result&#8230;) and manipulating with Result string or using a memory stream.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.deltics.co.nz/blog/?p=375&#038;cpage=1#comment-274</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Mon, 22 Sep 2008 12:15:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.deltics.co.nz/blog/?p=375#comment-274</guid>
		<description>Nice test!!

I wonder why Delphi 2009 still need its user(programmer) write below functions: 

PosIEx()
PosBack()
FastReplace()

that support unicode?

I write them by myself. not satisfied, you know, speed is important!

Bear</description>
		<content:encoded><![CDATA[<p>Nice test!!</p>
<p>I wonder why Delphi 2009 still need its user(programmer) write below functions: </p>
<p>PosIEx()<br />
PosBack()<br />
FastReplace()</p>
<p>that support unicode?</p>
<p>I write them by myself. not satisfied, you know, speed is important!</p>
<p>Bear</p>
]]></content:encoded>
	</item>
</channel>
</rss>
