<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
  <channel>
    <title>Smart String Concatenation</title>
    <link>http://blogs.lotterypost.com/speednet/2008/4/smart-string-concatenation.htm</link>
    <atom:link href="http://www.lotterypost.com/rss/blogcomments/21941" rel="self" type="application/rss+xml" />
    <description>Speednet's Blog: Smart String Concatenation</description>
    <dc:language>en-us</dc:language>
    <generator>Lottery Post RSS Generator</generator>
    <item>
      <title>Comment #1</title>
      <link>http://blogs.lotterypost.com/speednet/2008/4/smart-string-concatenation.htm</link>
      <guid isPermaLink="true">http://blogs.lotterypost.com/speednet/2008/4/smart-string-concatenation.htm</guid>
      <pubDate>Fri, 04 Apr 2008 18:56:38 GMT</pubDate>
      <dc:creator>JADELottery</dc:creator>
      <description><![CDATA[interesting, i have to make a note of this.]]></description>
      <category>JADELottery</category>
    </item>
    <item>
      <title>Original Blog Entry: Smart String Concatenation</title>
      <link>http://blogs.lotterypost.com/speednet/2008/4/smart-string-concatenation.htm</link>
      <guid isPermaLink="true">http://blogs.lotterypost.com/speednet/2008/4/smart-string-concatenation.htm</guid>
      <pubDate>Fri, 04 Apr 2008 16:29:51 GMT</pubDate>
      <dc:creator>Speednet</dc:creator>
      <description><![CDATA[<p>Whether on a individual computer or a server attached to the Internet someplace, people are always looking for better performance of their software.</p><p>The first thought that comes to mind is often adding memory or a faster processor, or choosing a faster operating system or web browser.</p><p>But many times (perhaps <strong>most</strong> times) the real culprit for slow performance is the programmer who wrote the software.</p><p>As a programmer, my philosophy is that I personally take responsibility for the performance of my programs, rather than require faster hardware or environment.&nbsp; I have found that by forcing myself to think about the efficiency of every piece of code I write, the combined performance savings across an entire application is <strong>immense</strong>.</p><p>Think about it: if you save just a quarter of a second of time serving&nbsp;one page view,&nbsp;you&nbsp;have actually saved about 70 <em>hours</em> of processor time after a million page views.&nbsp; And for a site like Lottery Post that gets many millions of page views a month... well, you can do the math.</p><p>With that concept in mind, I'd like to offer&nbsp;some tips about string concatenation that will make your programs more efficient.</p><p>String concatenation &mdash; the processing of combining strings together &mdash; is something that is still slow on many popular platforms.&nbsp; For example, on all versions of Internet Explorer (up until IE8 is released), combining strings is very inefficient.&nbsp; Even in the .NET framework, there are some ways of programming that will result in poor performance.</p><p><strong>String Concatenation in .NET</strong></p><p>In the .NET framework, whether you're programming in C# or VB, the best way to combine strings is using the <span style="font-family: Courier New,Courier,monospace;">String.Concat()</span> method.&nbsp; However, just using <span style="font-family: Courier New,Courier,monospace;">String.Concat()</span> is not enough, and here's where the extra efficiency comes into play:</p><p>Make sure that all the arguments passed to <span style="font-family: Courier New,Courier,monospace;">String.Concat()</span> are strong-typed Strings.&nbsp; Otherwise, an overloaded version of the <span style="font-family: Courier New,Courier,monospace;">String.Concat()</span> will be used that accepts all Object arguments, and each value you pass will be boxed to an Object (when passed) and un-box....</p><p>[ <a href="http://blogs.lotterypost.com/speednet/2008/4/smart-string-concatenation.htm">More</a> ]</p>]]></description>
      <category>* Original Blog Entry</category>
      <wfw:comment>http://www.lotterypost.com/blogentry/21941</wfw:comment>
    </item>
  </channel>
</rss>
