[fpc-devel] Faster InitObject

Amir amir at aavani.net
Thu Feb 23 19:19:38 CET 2012

On 02/23/2012 02:59 AM, Hans-Peter Diettrich wrote:
> Amir schrieb:
>> Hi,
>> I have a code, developed in object pascal, with many classes. The
>> project is working fine.
>> Today, I used callgrind (valgrind --tool=calgrind) to see which
>> function consumes the most execution time and I noticed that the most of
>> time in my project is consumed by fillchar function.
>> Incl. Self. Called Function
>> 29.78 29.72 26M SYSTEM_FILLCHAR$formal$INT64$BYTE
>> 19.07 19.07 123M SYSTEM_MOVE$formal$formal$INT64
>> ....
> I suspect that the procedure initialization time is added to the first
> explicit statement. The initialization can include try-except/finally
> blocks, memory allocation (in constructors) or more.
> Please create another procedure or method, that uses FillChar not as the
> first statement, and test again.
I am not sure what you are asking. The callgrind outputs the call tree 
and other information....


More information about the fpc-devel mailing list