Thank you all!
MrBCX: could you please post the actual C code? I havn't seen any problems like that on my machine. It sounds like it may be a matter of disk swapping. The compilation speed is either the same or faster here - but then again, I have plenty of RAM. How much RAM do you have installed in your machine?
In July 2007 I reported a similar problem to the Visual C++ Team at
Microsoft. The Borland compiler was compiling an optimized (-Ox flag)
BCX in less than 2 seconds while the Microsoft compiler was taking 324
seconds for an equivalently flagged compile.
Their final reply was, in part,
"Thanks for your feedback. The Visual C++ team has evaluated the bug and
determined it does not meet the guidelines necessary to warrant a fix.
To understand these guidelines please refer to
http://blogs.msdn.com/vcblog/articles/621116.aspx.
In particular, function that takes longest to compile is
RunTimeFunctions, which is a pretty big function. Compiler is not aware
that vast majority of the instructions are the printf calls, so it tries
to optimize the code the best possible. Also, there is a lot of control
flow which is based on global variables, so we can't really optimize
those--yet we spend a lot of time trying. We will consider changing our
optimizer technology in the future to add more analysis up-front, which
will enable us to wind down optimization in a function like this. In the
meantime, an easy workaround is to put #pragma optimize("g",off) around
this function."
I have unsuccessfully attempted to use the suggestion to turn off
#pragma optimize for the RunTimeFunctions sub while compiling BCX
with Pelle's C 6.5 RC1. If anyone can get this to work I
would appreciate knowing the specific details.
At that time, 2007, the Borland compiler produced a BCX.exe that ran faster
than that produced with any other compiler but I think that now the
Pelle's C 6.5 beta -Ot compiled BCX.exe has beat that time by about 10%.
Robert Wishlaw