[fpc-devel] (patch) improvement of object creation speed
Florian Klaempfl
florian at freepascal.org
Thu May 22 13:54:11 CEST 2008
Sergei Gorelkin schrieb:
> Hello,
>
> While valgrinding my projects, I noticed that InitInterfacePointers
> procedure eats noticeable amount of CPU cycles. For TObject.NewInstance
> call tree, I got Irefs for GetMem and InitInterfacePointers relating
> approx. as 42/36, i.e. InitInterafacePointers only a bit faster than
> GetMem.
> What's worse, in projects that do not use interfaces (like the compiler
> itself), InitInterfacePointers is nothing but a waste of time.
>
> I addressed this in two ways:
Thanks, applied.
>
> There are also some minor changes, like {$IMPLICITEXCEPIONS OFF} around
> TObject.Create (nothing can cause an exception in an empty method),
I remove this part, the compiler handles this now in a generic way by
replacing
try
finally
statement
end;
by
statement;
More information about the fpc-devel
mailing list