Nicolas Neuss <[EMAIL PROTECTED]> writes: > I recently tried to accelerate mesh refinement in my PDE toolbox Femlisp by > auto-generating the refinement code. This worked quite well, but I > observed that compilation times increase dramatically with the size of the > code (increasing dimension of the cell). > > Dimension Size of code (#atoms in tree) Time (secs) > 2 384 0.4 > 3 1524 4.0 > 4 5736 61.3
It looks like somewhere in the compiler there is an O(n^2) algorithm which is the bottleneck in the compilation for your program. This isn't entirely surprising to me: many of the phases in a compiler have problems with solutions easily expressed in O(n^2) time or worse. Have you tried profiling bits of the compiler to see where most of the time is spent? Cheers, Christophe
