[fpc-pascal]Profiling and classes

Marco van de Voort marcov at stack.nl
Sun Mar 30 23:09:17 CEST 2003


> >> routines, which was also the case (the non-OO routines uses 10 sec for a
> >> 500x500 matrix inversion, while the OO routines uses 110 secs (!) for the
> >> same).
> >
> > Which compiler did you use? Which OO model did you use?
> >
> > If the answers are 1.0.6 and class then you should try the 1.1 compiler and
> > add {$implicitexceptions off}
> 
> OK, I have just tried it. The result is:
> 
> 104 secs for fpc 1.1 with implicitexceptions off
> 108 secs for fpc 1.0.6
> 
> So this didn't help much. However I'm quite sure that it has to with the
> OO-methods for accessing array-elements (this will of course be slower than
> accessing the elements directly :-)). So I will just (maybe) have to not use
> these methods in descendant classes if I want better performance...

If you mean properties implemented with methods compared to accessing a real array,
this is very probably the case ;-)



More information about the fpc-pascal mailing list