Go to the first, previous, next, last section, table of contents.

Optimization

GNU Pascal is a 32 bit compiler with excellent optimization algorithms (which are identically the same as those of GNU C). There are three optimization levels, specified by the command line options `-O', `-O2', and `-O3'. (Levels up to `-O6' are worked on.)

One example:

  Program Test;

  Var
    A, B: Integer;

  begin
    A:= 3;
    B:= 4;
    writeln ( A + B );
  end.

When GNU Pascal compiles this program with optimization, it recognizes that the argument of writeln is the constant 7--and optimizes away the variables A and B.

For more about optimization, see the GNU C documentation.


Go to the first, previous, next, last section, table of contents.