[fpc-devel] Merging identical procedure proposals

J. Gareth Moreton gareth at moreton-family.com
Sat Oct 16 21:57:04 CEST 2021


Certainly possible, and would address the whole function pointer thing, 
although I do question the performance hit because of the extra jump, 
especially for small procedures, as well as the fact that the function 
overhead would still be present.  Certainly a safe start though.

Gareth aka. Kit

On 16/10/2021 20:33, Yuriy Sydorov via fpc-devel wrote:
>
> On 16.10.2021 21:45, J. Gareth Moreton via fpc-devel wrote:
>> I figured that virtual methods would be no-go and that this would 
>> only apply to static methods.  It seems a shame to dismiss it 
>> completely though because there's a huge number of procedures that 
>> compile to the same code, especially when generics come into play, 
>> and I have identified a fair number in the compiler itself (at least 
>> when compiled under x86_64-win64).
>
> Instead of complete elimination of the duplicate function code you can 
> replace it by the unconditional jump to the single copy of the 
> function code.
>
> Yuriy.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>

-- 
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the fpc-devel mailing list