Jonas Maebe wrote:
On 20 Nov 2009, at 18:08, Paul Ishenin wrote:

I have attached compiler gprof output of compiler itself. Using output I was 
able to find and improve(?) 3 functions I found in output.

Did you benchmark whether this changed code is indeed faster and whether it 
makes any difference at all for the compiler? Changing working code because it 
/might/ become slightly faster that way is not a good approach to keeping 
source code either maintainable or fast (especially not if it's done by adding 
more with-statements).

I did not benchmarked the changed code. I made the change because of gprof numbers (compiler compiles the compiler):

% cumulative self self total time seconds seconds calls Ts/call Ts/call name before: 0.62 4.27 0.05 CCLASSES_TDYNAMICARRAY_$__WRITE$formal$LONGWORD
after:
0.37 4.99 0.03 CCLASSES_TDYNAMICARRAY_$__WRITE$formal$LONGWORD

On a smaller test (compiling not the compiler but some small application) dynamicarray.read and write were on top of the list.

Best regards,
Paul Ishenin.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to