Re: Where is stringbuilder?
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 19 Oct 2006 09:12:09 +0200
"J French" <erewhon@xxxxxxxxxx> wrote in message
news:4535d495.327324791@xxxxxxxxxxxxxxxxxxx
[...]
For L9 := 1 To L Do
BigStr[ L9 + Start ] := SmallStr[ L9 ] ;
That loop could be replaced by a Move.
[...]
Personally I don't think that this is worth worrying about unless
one is doing a heck of a lot of concatenations on the same String
ISTR postings here from people who were adding a single character to
a string a mere ten thousand times or so, and wondering why it was
so slow.
At the risk of starting another code contest, there are _wonderful_
opportunities for premature optimisation in a function that returns
a string containing N instances of character C. And for sufficiently
large N, not even that premature.
'Result:=''; for i:=1 to N do Result:=Result+C;' is _definitely_ the
wrong answer.
Groetjes,
Maarten Wiltink
.
- Follow-Ups:
- Re: Where is stringbuilder?
- From: J French
- Re: Where is stringbuilder?
- References:
- Where is stringbuilder?
- From: brett
- Re: Where is stringbuilder?
- From: Rob Kennedy
- Re: Where is stringbuilder?
- From: J French
- Where is stringbuilder?
- Prev by Date: Re: Where is stringbuilder?
- Next by Date: Re: This post is utter and complete spam. Anyone want a job?
- Previous by thread: Re: Where is stringbuilder?
- Next by thread: Re: Where is stringbuilder?
- Index(es):
Relevant Pages
|