Hello, folks!
I just compiled a Unit with a 5000-line interface part with GPC. 50 (fifty) seconds on a Pentium 166. :-( That's about a factor of 100 (!) slower than Borland Pascal 7.0 on the same host. :-( :-(
Using (*$M Message *) directives, I found out that 90% of the time was spent in writing the GPI file (this is done when `Implementation' is read):
Unit Foo;
Interface
(* ... Many constant definitions ... *)
(*$M Writing GPI file ... *)
Implementation
(*$M GPI file written. *)
(* ... other stuff *)
end.
I think I know already why this takes so long, so you can expect this bottleneck to vanish in the future. Now comes my request:
Please help to find similar bottlenecks in GPC!
To do so, you can compile your longer programs with the `-Q' option which makes GPC output the name of each function it compiles, and/or you can scatter (*$M message *) directives about your source like I did in the example above.
As written in the DJGPP FAQ, GCC compiles 250 (-O2) to 430 (-O0) lines per second on an i486DX2-66. Since Pascal is stricter than C, GPC should not be slower!
Thanks in advance,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201] maintainer GNU Pascal [970510] - http://home.pages.de/~gnu-pascal/ [970125]