Re: Speedy compilers

Amit Patel <amitp@theory.stanford.edu>
10 Dec 1998 19:20:02 -0500

          From comp.compilers

Related articles
[4 earlier articles]
Re: Speedy compilers toon@moene.indiv.nluug.nl (Toon Moene) (1998-11-21)
Re: Speedy compilers joachim.durchholz@munich.netsurf.de (Joachim Durchholz) (1998-11-24)
Re: Speedy compilers andrewf@slhosiery.com.au (Andrew Fry) (1998-11-24)
Re: Speedy compilers bernecky@acm.org (Robert Bernecky) (1998-11-24)
Re: Speedy compilers icedancer@ibm.net (1998-11-30)
Re: Speedy compilers janusz.szpilewski@alcatel.pl (Janusz Szpilewski) (1998-11-30)
Re: Speedy compilers amitp@theory.stanford.edu (Amit Patel) (1998-12-10)
Re: Speedy compilers mfinney@lynchburg.net (1998-12-13)
Re: Speedy compilers eclectictech@usa.net (1998-12-18)
Re: Speedy compilers zalman@netcom.com (1998-12-18)
Re: Speedy compilers Rudi.Ziegaus@bingo.baynet.de (1998-12-18)
Re: Speedy compilers Rudi.Ziegaus@bingo.baynet.de (1998-12-18)
Re: Speedy compilers jeff-news@jeff-jackson.com (Jeff Jackson) (1998-12-18)
[6 later articles]
| List of all articles for this month |

From: Amit Patel <amitp@theory.stanford.edu>
Newsgroups: comp.compilers
Date: 10 Dec 1998 19:20:02 -0500
Organization: Compilers Central
References: 98-11-047 98-11-086 98-11-089 98-11-115
Keywords: performance

Joachim Durchholz <joachim.durchholz@munich.netsurf.de> writes:


> > [Given the relative speeds of Turbo C and Visual C++, I expect that
> > this lesson may no longer apply. -John]
>
> The lesson still applies, but there is no fast C++ compiler on Windows
> (not because C++ is slow but because these compilers all include
> megabytes of Windows header files by default). I think a compiler
> that uses precompilation in a sensible manner will blow the socks off
> all existing C++ compilers. ...


IBM's Visual Age C++ 4.0 compiler is supposed to solve this problem by
treating each function (rather than each 1000 lines) separately, and
then maintaining a dependency graph to tell it how to recompile when a
change is made. For example, if you have a function that creates a
stack object from class X, then it depends on the size of X. If you
change the size of X, then that function is recompiled. If you have
another function that creates a heap object from class X, then it
probably does not depend on the size of X. If you change the size of
X, the compiler would know that the function does not have to be
recompiled.


The header files are read in once and put into the dependency graph.
After that, unless they are not modified (either by editing the file
or by changing macros that they depend on), they do not have to be
re-analyzed. This is GREAT for those megabytes of Windows headers.


The demo of this system is impressive. The demonstrator made changes
to a Windows application, and the recompile took around 1 second. Of
course, changes that affect a lot of code will take longer (especially
if you change a function that is being inlined in many places), but
most changes I make are not to the header files, but rather to
implementation files, so I think most of the time I'd get speedy
compiles.


Unfortunately, it was 1996 when I saw the demo, and two years later,
it's still not released. (I suspect they were waiting for the C++
Standard.) I think it's now in beta.


- Amit


--
Amit J Patel, Computer Science Department, Stanford University


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.