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

Sven Barth pascaldragon at googlemail.com
Tue Apr 19 13:37:15 CEST 2022


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

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20220419/c10ce003/attachment.htm>


More information about the fpc-devel mailing list