<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Am 07.01.2024 um 10:01 schrieb Florian
Klämpfl via fpc-pascal:<br>
</div>
<blockquote type="cite"
cite="mid:E898066D-F171-44EF-8A97-232C1615258C@freepascal.org">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<br id="lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>Am 06.01.2024 um 20:05 schrieb Matthew Phillips via
fpc-pascal <a class="moz-txt-link-rfc2396E" href="mailto:fpc-pascal@lists.freepascal.org"><fpc-pascal@lists.freepascal.org></a>:</div>
<br class="Apple-interchange-newline">
<div>
<div>I compiled the Hello World program from the docs and
noticed that it's<br>
435k. Compared to a lot of newer languages, like Golang,
that's not bad<br>
at all.<br>
<br>
I then compiled the equivalent C program with gcc which
came out at<br>
33k. So I'm just curious, where does the difference comes
from?<br>
Could it be that fpc is including some parts that are not
being used in<br>
this simple of a program or is more going on?<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<a href="https://wiki.freepascal.org/Size_Matters"
moz-do-not-send="true" class="moz-txt-link-freetext">https://wiki.freepascal.org/Size_Matters</a></div>
<br>
</blockquote>
To underline this with some numbers (I assume you mean the
demo/text/hello.pp which only contains a mere "Writeln('Hello
World')" and no additional units; all tests on x86_64-linux with
3.3.1):<br>
<br>
- FPC compiled as is: 388976 B<br>
- FPC compiled with full smartlinking: 55920 B<br>
- FPC compiled with C linkage: 388760 B<br>
- FPC compiled with full smartlinking and C linkage: 56792 B<br>
<br>
(gotta admit, the last one surprised me though ^^')<br>
<br>
Regards,<br>
Sven<br>
</body>
</html>