a possible performance bug in VC 7.1 compiler

  • Thread starter Thread starter Bumbrlik
  • Start date Start date
B

Bumbrlik

To Carl (or other folks from MSFT):

When compiling LAPACK (a numerical library) on VC 7.1 I
encountered a file that took forever to compile under the
Release mode. The file has under 2,000 lines and it takes
over 8 minutes to compile that file alone on my super new
dual Xeon 4GB RAM machine. Each of the other files in this
library takes under a second to compile and some of them
are much larger.

I realize that it is the content of the source file that
mostly influences the time needed for compilation. Still,
it seems to me that something is not right.

If you have LAPACK library, the name of the file is
clarfx.c. If you don't I will be happy to email it to you.

Bumbrlik
 
Bumbrlik said:
To Carl (or other folks from MSFT):

I'm not from MSFT - just an MVP.
When compiling LAPACK (a numerical library) on VC 7.1 I
encountered a file that took forever to compile under the
Release mode. The file has under 2,000 lines and it takes
over 8 minutes to compile that file alone on my super new
dual Xeon 4GB RAM machine. Each of the other files in this
library takes under a second to compile and some of them
are much larger.

I realize that it is the content of the source file that
mostly influences the time needed for compilation. Still,
it seems to me that something is not right.

If you have LAPACK library, the name of the file is
clarfx.c. If you don't I will be happy to email it to you.

That's a long time. Other than being aware that LAPACK is a numerical
library, I know nothing about it. Is it C or C++? I ask because the only
time I've seen compile times like that for VC is with C++ code that makes
heavy use of templates (e.g. Spirit-based parsers).

-cd
 
The code is pure C - just some for cycles and a few goto
statements.

Bumbrlik

PS: Forgive my ignorance - what is MVP ?
 
Trevor Misfeldt said:
We see it, too, when compiling CLAPACK. Most of those C files take on
the order of 0.01 seconds to compile but clarfx.c takes around 100
seconds. I don't see anything unusual in that particular file. I'm
running VC 7.0 on a P4.

I see *some* unusual things in that file - that it is one single
function running for 2000 lines of code. It also has 8 parameters and
about 60 local variables. And lots of gotos. Doing some kind of data
flow analysis on this *would* take a lot of time.

This is not the kind of code a C++ compiler is tuned for.


Bo Persson
(e-mail address removed)



- Trevor

--
Trevor Misfeldt
CEO, CenterSpace Software
http://www.centerspace.net

"Carl Daniel [VC++ MVP]" <[email protected]> wrote in message
That's very odd - pure C usually compiles lightning fast. I'll make sure
someone from the VC team sees your original posting - there's got to be
something odd about that file to make it go so slowly.


See http://mvp.support.microsoft.com

-cd
 
Back
Top