[fpc-devel] profiling under windows
JoshyFun
joshyfun at gmail.com
Fri Nov 20 19:08:08 CET 2009
Hello Paul,
Friday, November 20, 2009, 6:08:28 PM, you wrote:
PI> What I can't understand why the biggest %time has the lowest seconds. E.g:
PI> % cumulative self self total
PI> time seconds seconds calls Ts/call Ts/call name
PI> 5.11 0.36 0.36
PI> CCLASSES_TFPHASHLIST_$__INTERNALFIND$LONGWORD$SHORTSTRING$LONGINT$$LONGINT
PI> ...
PI> 0.14 7.05 0.01
PI> fpc_shortstr_to_ansistr
Because that's it time, which is splitted with other functions called
by itself, so discounted the time of the called functions the
investigated function only spend a few seconds (self). Example:
procedure Dummy();
begin
FillChar(P,$7FFFFFFF,0);
FillChar(P,$7FFFFFFF,0);
FillChar(P,$7FFFFFFF,0);
FillChar(P,$7FFFFFFF,0);
end;
Dummy will get the highest cumulative time, but its (self) real time
would be almost nothing.
PI> As result I don't understand which functions must be reviewed at first.
PI> Have anybody tried that before?
You must get the "calls", functions with more calls are usually the
ones that would get more benefit from any optimization. Also look for
functions (specially the basic ones) that spend too much time.
--
Best regards,
JoshyFun
More information about the fpc-devel
mailing list