Re: StringBuffer/StringBuilder efficiency



On Thu, 01 Oct 2009 16:24:58 -0700, Patricia Shanahan <pats@xxxxxxx>
wrote, quoted or indirectly quoted someone who said :


How about giving the multi-append a new name, such as "appendAll"? That
way, append of an array would have the append(Object) meaning, but
appendAll of a string[] would append each of its elements.

You could also invent a new StringBuilder, called Cat that was
stripped down of backtracking logic for speed -- doing nothing but cat
(append) operations. However, it still needs the gluing core logic to
reside in String where it can allocate the final String char[] value
the correct size and copy the pieces in directly.
--
Roedy Green Canadian Mind Products
http://mindprod.com

When you can?t find a bug, you are probably looking in the wrong place. When you can?t find your glasses, you don?t keep scanning the same spot because you are convinced that is where you left them.
~ Roedy
.



Relevant Pages

  • Re: Parsing / " characters
    ... have the rest of the code to append the ... - JCL inserts that string at the start of every program, ... >>the code associated with that program - in exact order, ... >>Dim db As Database, tdf As TableDef ...
    (microsoft.public.access.externaldata)
  • Re: Parsing / " characters
    ... create a new record in table TTT containing the string ... >I can append ALL the records from the ... >Dim db As Database, tdf As TableDef ... >> Dim lngFN as Long ...
    (microsoft.public.access.externaldata)
  • Re: Error Problem
    ... You need to eliminate the duplicates before doing the append.. ... If Job is the primary key and is causing the problem then you would rewrite the query to something like the following. ... Public Function fGetFirstChars_Nums_w(pString As Variant) As String ... Dim tmpStr As String ...
    (microsoft.public.access.modulesdaovba)
  • Re: Fastest way to append text to a TextBox
    ... What's the fastest way to append text to a TextBox? ... CPU and, even if I limit the TextBox to just 30KB of text, it takes over ... Private Sub AppendText(ByVal sText As String) ... Dim iLen As Integer = .Text.Length + sText.Length ...
    (microsoft.public.dotnet.languages.vb)
  • Error Problem
    ... Below is the code used to run 2 queries, 1 is an "Append Query and the other ... About to run append query... ... Public Function fGetFirstChars_Nums_w(pString As Variant) As String ... Dim tmpStr As String ...
    (microsoft.public.access.modulesdaovba)