Translation time

from Wikipedia, the free encyclopedia

In computer science, the term is compile time or compile time associated with operations performed by a compiler of the same period as the generation of object code are performed. Thus the translation time is the counterpart to the term ( runtime ).

Compilers typically carry out analyzes of the programs to be translated at compile time. In the case of statically typed programming languages such as Java , C # , Pascal or Haskell , this includes checking compliance with type compatibility when assigning and transferring parameters to subroutines . The expansion of templates (e.g. in C ++ ) is another operation that takes place at compile time.

As a rule, the translation of the source code of a program is followed by linking ( linking ), during which the object files of several program parts are linked to one another. The later execution of the program ( runtime ), however, is usually not directly related to the translation. In programming languages ​​that do not have a compiler and are interpreted, there is usually no translation time in the actual sense. In some cases, however, compilation is carried out with the help of just-in-time compilation even for interpreted languages. The time spent here is usually no longer counted as compilation time, but is assigned to the runtime of the program.

One strategy for improving software quality is to have as many checks as possible carried out at compile time so that errors are not only recognized during runtime, that is, while the program is actually being used.