[fpc-pascal] options for better performance & declaration of system procedures

章宏九 secludedsage at gmail.com
Thu Sep 24 10:31:04 CEST 2009


I just tried to unfairly compare fpc-compiled binary and gcc-compiled
binary under my Gentoo box. FPC is incredible. `ps` data shows the fpc
one costs nearly no memory? But I still notice it is a little slow. It
usually costs 0.5~1.0 time more than the gcc one. It seems as if fpc
saves memory in the cost of performance loss. Is it true? If so, is
there any options for better performance and no such insane memory

Interestingly, I just tried gpc also, gpc binary sometimes has a
better performance, but even cost more memory than gcc, which is not

Another question. I cannot find any declaration of the system
procedures such as WriteLn and ReadLn. I tried to find in fpcsrc
directory with grep but achieve nothing. FreePascal's documents says
the declarations are in rtl but the line number is 0. Are these system
procedures implemented in the compiler(built-in) or in the system
unit? I would like also to know the situation in C. (I mean
declaration of printf and scanf. Are they implemented in glibc or

Thank you very much.

More information about the fpc-pascal mailing list