<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 4/16/22 16:41, Sven Barth via
fpc-devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFMUeB-Qtn83w3qX4BiZq2Su-gpVq03F+t-UniWNzA1xQuxc+Q@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Benito van der Zander via
fpc-devel <<a
href="mailto:fpc-devel@lists.freepascal.org"
moz-do-not-send="true" class="moz-txt-link-freetext">fpc-devel@lists.freepascal.org</a>>
schrieb am Sa., 16. Apr. 2022, 15:43:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div id="m_-1720528784538656893smartTemplate4-template">Hi,<br>
</div>
<div><br>
</div>
<div>it could always inline it.</div>
<div><br>
</div>
<div>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)<br>
</div>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">FillChar is on most platforms an assembly
function and FPC *never* inlines assembly functions. <br>
</div>
</div>
</blockquote>
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.<br>
</body>
</html>