Windows DatabaseebooksStatistical Information

LLE10102 : Why is a Pascal or Delphi compiler so incredibly fast in comparison with a C or C++ compiler?

Symptom:

You are just wondering why this is a fact

Cause:

none

Solution:

The Pascal language (also called Delphi from time to time) has been designed or concipated to have a certain structure. This makes it possible to compile it in one pass. These kind of compilers are also called One-Pass-Compilers. The advantage is the speed of compilation. The compiler only has to read the input files once to generate the program, a C or C++ compiler has to go through the sources many times to find all the information it needs to generate the program.

The disadvantage of a One-Pass-Compiler is the possibility of optimisation. (although one might say that this is only academic) Another disadvantage of languages which can be compiled in one pass, is the flexibility of the structure. To make it possible to compile in one pass, the program need a certain structure resulting in less flexibility for the programmer. In the source the subroutines or functions have to be known before they can be called. As a result, the main program is at the end of a file.

Although you can say this is a disadvantage, some people call it an advantage. A Delpi or Pascal programmer needs less initial time to get to know a new program.

Disclaimer:

The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!
Copyright © 2004-2011 Lubby (V3.0.10 Aug 2011)
Sponsored by Keskon.
Statistical information by Google Analytics