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

Michael Van Canneyt michael at freepascal.org
Thu Oct 26 15:28:32 CEST 2006



On Thu, 26 Oct 2006, Graeme Geldenhuys wrote:

> 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

1. Further increased speed by removing your helper function altogether.

2. Made it thread-safe by making the global 'ulevel' variable
   an (optional) argument to the TestSuiteAsXML function.

   Remember: As a general rule, global variables are evil :)

Then committed.

Michael.



More information about the fpc-devel mailing list