Re: StringBuffer/StringBuilder efficiency
- From: Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 02 Oct 2009 05:49:58 -0700
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
.
- References:
- Re: StringBuffer/StringBuilder efficiency
- From: Roedy Green
- Re: StringBuffer/StringBuilder efficiency
- From: Eric Sosman
- Re: StringBuffer/StringBuilder efficiency
- From: Roedy Green
- Re: StringBuffer/StringBuilder efficiency
- From: Eric Sosman
- Re: StringBuffer/StringBuilder efficiency
- From: Patricia Shanahan
- Re: StringBuffer/StringBuilder efficiency
- Prev by Date: Re: StringBuffer/StringBuilder efficiency
- Next by Date: Re: math parser ?
- Previous by thread: Re: StringBuffer/StringBuilder efficiency
- Next by thread: Re: StringBuffer/StringBuilder efficiency
- Index(es):
Relevant Pages
|