Florian Klaempfl wrote:
Just curious, did anybody have profiling results which indicate that
as/is are really a bottleneck?

For Lazarus, I found that about 0.5% of the time is spent in 
TObject.InheritsFrom (I did two runs). About 50% of this comes from calls in 
TCustomForm.UpdateActions; the rest is mainly scattered. It is comparable with 
FillChar, CompareMemRange and CompareText.

So what's a bottleneck? I'm happy it doesn't eat say 10%, 20% or even 50% of 
CPU time, but imho a serious improvement for a function taking 0.5% -- or more 
-- is worth some attention.

When using '(AClass.vmtPreOrderIndex <= Self) and (Self <= 
AClass.vmtLastInSubtreeIndex)', those 0.5% will surely go to less than 0.1%. 
(Especially if it gets inlined :) )

BTW I played around a bit with valgrind/callgrind and KCacheGrind; these are 
very nice tools for profiling! The call graphs in KCacheGrind are really nice.

Bram
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to