[fpc-pascal] Re: making FPC more code optimized
Florian Klämpfl
florian at freepascal.org
Sun Apr 29 12:35:37 CEST 2012
Am 29.04.2012 12:13, schrieb ik:
> Let's take simple program:
>
> ---- pascal code ----
>
> program hello;
>
> begin
> writeln('Hello World');
> end.
>
> ----- pascal code ----
>
> vs c code:
>
> ------ c code -----
> #include <stdio.h>
>
> int main(int argc, char ** argv) {
> printf("Hello World\n");
> return 0;
> }
>
> ------ c code ------
>
> The code executable will be not only smaller, but takes less memory to
> run,
How did you measure this? Did you take the dyn. libs into account or did
you link statically? For me, the FPC executable is much smaller, gcc
-static creates something with 500 kB, and 1000 runs of the FPC version
take 20 per cent less time than the C one?
More information about the fpc-pascal
mailing list