On 4/16/22 16:41, Sven Barth via fpc-devel wrote:
Benito van der Zander via fpc-devel <fpc-devel@lists.freepascal.org> schrieb am Sa., 16. Apr. 2022, 15:43:

    Hi,

    it could always inline it.

    For small sizes do that mov and for large sizes do rep stosb on
    x86. It is very fast nowadays. Faster than FillChar on my Intel
    laptop. (except for mid sizes like 128 bytes)


FillChar is on most platforms an assembly function and FPC *never* inlines assembly functions.
But having it as an intrinsic would allow the CG to generate optimal sequences for certain cases, and otherwise fall back to the inherited method which just inserts a call to the RTL Fill* procedures.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to