Re: String Functions
- From: "Pierre le Riche" <pleriche@xxxxxxxxxxx>
- Date: Sat, 30 Apr 2005 22:15:55 +0200
> Note what happens if the number of repeats is reduced
> to just 1 (near bottom of post). I think that this the key to
> the observed differences --JohnH
It's because the SetLength in your function becomes "free" after my function
has been called, setting the correct length. The SetLength call is the most
expensive part in both our routines.
If you set result[i] := '' before each benchmark iteration you will fix the
problem. Better yet, don't benchmark the functions in the same exe. Compile
one with yours and one with mine and run them separately.
Pierre
.
- References:
- String Functions
- From: Chekcin
- Re: String Functions
- From: Dennis
- Re: String Functions
- From: Florent Ouchet
- Re: String Functions
- From: John Herbster
- Re: String Functions
- From: Pierre le Riche
- Re: String Functions
- From: John Herbster
- String Functions
- Prev by Date: Re: String Functions
- Next by Date: Re: String Functions
- Previous by thread: Re: String Functions
- Next by thread: Re: String Functions
- Index(es):
Relevant Pages
|