[fpc-devel] Thoughts: Make FillChar etc. an intrinsic for specialised performance potential

J. Gareth Moreton gareth at moreton-family.com
Tue Apr 19 14:49:16 CEST 2022


Interesting - I wasn't aware of this intrinsic!  I'll make a note of 
that one.

It might be useful to transform FillChar calls to the Default intrinsic 
at the node level.

Gareth aka. Kit

On 19/04/2022 12:43, Stefan Glienke via fpc-devel wrote:
> You are the expert but I am not sure how that can be the case given you only need to zero a register and blast that into the record location opposed to twice as many mov operations being generated that I have seen with the record that Gareth originally posted.
>
>> On 19/04/2022 13:37 Sven Barth via fpc-devel <fpc-devel at lists.freepascal.org> wrote:
>>
>>
>> Stefan Glienke via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am Di., 19. Apr. 2022, 12:38:
>>> If you want to zero small records more efficiently it might be better using Default(t) for that and looking at optimizing the code the compiler generates for that as it seems it produces an empty temp variable which it assigns instead of simply zeroing the record variable where default() is being assigned to.
>> This was an explicit design choice I made, because it pays of as soon as a second such assignment for the same type is made.
>>
>> Regards,
>> Sven
>> _______________________________________________
>> fpc-devel maillist - fpc-devel at lists.freepascal.org
>> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
> _______________________________________________
> 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