<p style="padding:0 0 0 0; margin:0 0 0 0;">Hi<span style="font-size: 10pt;">,</span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"><span style="font-size: 10pt;">I found this article: </span>https://drewdevault.com/2020/01/04/Slow.html</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">but FPC is missing, so I<span style="font-size: 10pt;"> wrote simple:</span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">program Project1;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">begin</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> writeln('Hello world!');</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">end. </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">$ fpc -O3 -XX Project1.pas</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">$ strace -C ./Project1</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">% time seconds usecs/call calls errors syscall</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">------ ----------- ----------- --------- --------- ----------------</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> 30.83 0.000037 37 1 readlink</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> 25.83 0.000031 8 4 ioctl</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> 18.33 0.000022 22 1 write</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> 17.50 0.000021 5 4 rt_sigaction</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> 4.17 0.000005 5 1 getrlimit</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> 3.33 0.000004 4 1 execve</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">------ ----------- ----------- --------- --------- ----------------</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">100.00 0.000120 12 total</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">It results in 30kB binary, 12 syscalls<span style="font-size: 13.3333px;"> </span><span style="font-size: 13.3333px;">total, 6 unique. IMO appropriate.</span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"><span style="font-size: 13.3333px;">Has the fact that strings are managed types some relevance here?</span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">Thanks, Vojtěch.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"><span style="font-size: 13.3333px;"><br />
</span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">(FPC 3.0.4)</p>