[fpc-devel]Unexpected long compilation times when using multi-dimensional array

s393534 at pacluster.win.tue.nl s393534 at pacluster.win.tue.nl
Sun Feb 3 20:18:43 CET 2002


Hello,

I have found some unexpected long compilation times with a multidimensional
array. For the program below, compilation takes about eight minutes
on a pentium III 533 Mhz, with 256 MB ram, running Linux. I'm using fpc
1.0.4 with the default options. [time fpc SimpleAssignment.p] I have found
similar behaviour for the windows version.

The data structure is used more often in a larger program I am working
with, which leads to compilation times of over an hour.

Is this a known 'feature' of the compiler or is there maybe an easy way
to work around it?

Regards,

Cas

Cas Cremers
s393534 at pacluster.win.tue.nl
Student of computing science
Technical University of Eindhoven

//------------------------------------------
program SimpleAssignment;

{ 8m20s }

type
  B = Boolean;
  T = array [ B, B, B, B, B,
              B, B, B, B, B,
              B, B, B, B, B
            ] of Integer;

procedure Init ( var a: T; c: Integer );
  begin
  a [ True, True, True, True, True,
      True, True, True, True, True,
      True, True, True, True, True
    ] := c
  end; { Init }

var
  a: T;

begin
  Init ( a, 0 )
end.
//------------------------------------------




More information about the fpc-devel mailing list