[fpc-devel] [patch] - fpcUnit testreport.pp

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Oct 26 15:12:51 CEST 2006


Hi

Thanks for that, I didn't know about that function.  Attached is the
patch using the new StringOfChar.

Incidently the speed increase is not much, but yes it is faster.
Maybe my test cases are just not big enough.   ;-)
I did 4 test runs with the old trSpace function and did 4 test runs
with the new trSpace function outputing 80 lines of text each with
varied levels of indentation.
The huge speed increase was:    0.00145 seconds

Thanks, that really cut down on my coffee break.  :-)

Regards,
  - Graeme -


On 26/10/06, Michael Van Canneyt <michael at freepascal.org> wrote:
>
>
> On Thu, 26 Oct 2006, Micha Nelissen wrote:
>
> > Graeme Geldenhuys wrote:
> > > +begin
> > > +  sString := '';
> > > +  for i := 1 to pIntLen do
> > > +    sString := sString + ' ';
> > > +  Result := sString;
> > > +end;
> >
> > I object to the inefficiency of this implementation. Isn't there a routine in
> > system to generate a string of X characters ?
>
> Yes. StringOfChar()
>
> Michael.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>


-- 
There's no place like 127.0.0.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testreport.pp.patch
Type: text/x-patch
Size: 515 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20061026/696ba5db/attachment.bin>


More information about the fpc-devel mailing list