[fpc-pascal] Traits Proposal

Ralf Quint freedos.la at gmail.com
Tue Feb 16 20:26:56 CET 2021


On 2/16/2021 10:48 AM, Sven Barth via fpc-pascal wrote:
> Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org 
> <mailto:fpc-pascal at lists.freepascal.org>> schrieb am Di., 16. Feb. 
> 2021, 19:21:
>
>     >
>     > There we have:
>     >
>     > * slower creation of the class, because each implemented
>     interface adds another VMT reference to the class which needs to
>     be initialized.
>
>     How bad is this? We need to make a test case we can profile. For
>     example if you have a game that creates 1000 classes 60 frames per
>     second. If adding interfaces to the classes hurts this process we
>     may have a deal breaker.
>
>
> If you need to create 1000 class instances each frame then you have a 
> flaw in your logic in my opinion.

Yup, that would be a deal breaker right from the get go...

Ralf




-- 
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20210216/916d5664/attachment.htm>


More information about the fpc-pascal mailing list