> On Feb 17, 2021, at 11:11 AM, Benito van der Zander via fpc-pascal > <fpc-pascal@lists.freepascal.org> wrote: > > just open the disassembler window in Lazarus and single step through all the > instructions. Then you see everything > > create alone calls a bunch of methods: > > TInterfacedObject.NewInstance > TObject.NewInstance > getmem > TObject.InitInstance > fillchar > InitInterfacePointers > fpc_pushexceptaddr (on linux only?) > fpc_setjmp > TInterfacedObject.AfterConstruction >
So where is your 10% performance hit coming from then? on init: InitInterfacePointers or TInterfacedObject.AfterConstruction? otherwise, during the wrapper function? As Sven pointed out the ref counting happens with records operators also. ARC is general may just be slow if you implement it everywhere. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal