[fpc-pascal]Performance: Free Pascal vs GNU Pascal

Florian Klaempfl Florian.Klaempfl at gmx.de
Sun Dec 29 17:11:23 CET 2002

Mark Emerson wrote:
> How fast is the code generated by FPC versus GPC?  Have there been any
> benchmarks comparing FPC with GPC....especially on Windows...in other
> words how well are these compilers optimizing?
> I haven't written Pascal code in years...but the Borland compilers made
> code that "screamed"....on those old platforms.  While I realize a
> comparison might not be possible, how does FPC (and GPC) compare to the
> old Borland style compilers?

You mean TP? You can't compare it because TP is 16 Bit and FPC and GPC 32 Bit 
but on modern processors the code generated by FPC or GPC is lightyears ;) faster

> Also, does anyone have a feeling of how the current Pascal optimizations
> compare to the C compiler optimizations for various platforms?  In other
> words, is there any merit to the claim I'ver heard that the fastest
> compiled code comes from C compilers?
> My questions are loosely structured, and perhaps naive...but nonetheless
> important as I make a fundamental decision regarding my development
> environment.  Any light on the subject would be appreciated.

FPC is optimized for large programs with complex statements and heavy heap 
usage like the compiler itself. OTOH, on modern processors the instruction 
selection of the compiler isn't that important. Much more important is that 
the programmer takes care of the hierachical memory structure and the 
alignment requirements.

More information about the fpc-pascal mailing list