Re: String Functions



> 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


.



Relevant Pages

  • Re: Scutaro.........blah!
    ... batting at the bottom of the order if they bring back Bay: ... Only OK if he repeats 2009? ... Except if he becomes just a "good utility player" they still ...
    (alt.sports.baseball.bos-redsox)
  • Re: Duplicating Table
    ... It is not the header rowq which repeats but the cell at the bottom of the ...
    (microsoft.public.word.tables)
  • Re: Serious question about Plowman & someone called Barker
    ... Is Barker Ming and Midwich Cookie, People's Poet etc? ... I just can't get to the bottom of what the rowing is all over, ... up on all the repeats. ...
    (uk.media.tv.misc)
  • THEME BKG
    ... I am using Windows XP / Frontpage Page 2003 ... I designed a full screen graphic 1076 x 760, to be used for my Theme Bkg. ... repeats. ... How do I stop it from repeating at the bottom and right side? ...
    (microsoft.public.frontpage.client)
  • THEME BKG
    ... I am using Windows XP / Frontpage Page 2003 ... I designed a full screen graphic 1076 x 760, to be used for my Theme Bkg. ... repeats. ... How do I stop it from repeating at the bottom and right side? ...
    (microsoft.public.frontpage.client)