Re: Speedy compilers

fjh@cs.mu.OZ.AU (Fergus Henderson)
19 Dec 1998 11:22:50 -0500

          From comp.compilers

Related articles
[14 earlier articles]
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)
Re: Speedy compilers albaugh@agames.com (1998-12-19)
Re: Speedy compilers terryg@uswest.net (1998-12-19)
Re: Speedy compilers genew@vip.net (1998-12-19)
Re: Speedy compilers fjh@cs.mu.OZ.AU (1998-12-19)
Re: Speedy compilers rweaver@ix.netcom.com (1998-12-19)
Re: Speedy compilers zalman@netcom.com (1998-12-19)
| List of all articles for this month |
From: fjh@cs.mu.OZ.AU (Fergus Henderson)
Newsgroups: comp.compilers
Date: 19 Dec 1998 11:22:50 -0500
Organization: Computer Science, The University of Melbourne
References: 98-11-047 98-11-086 98-11-089 98-11-109 98-12-045
Keywords: optimize

"Jeff Jackson" <jeff-news@jeff-jackson.com> writes:


>I have a similar story to tell. I did a complete rewrite of the peephole
>optimizer of a compiler at what was then the Harris Computer Systems
>Division. The peephole optimizer deleted enough code that there
>was a net decrease in compile time. So, even at "Minimal" optimization,
>we ran peephole.


Yep, similar story here too. For the Mercury compiler, the
optimization level is specified as an integer (via e.g. `-O2' or
`-O6'). But level zero (`-O0') doesn't mean turn off all
optimizations, it just means try to compile as fast as possible. To
turn off all optimizations, you have to specify an optimization level
of -1 ;-).


I've also noticed the same kind of phenomenon with GNU C. Mercury
compiles via C, using gcc, and I've noticed that compilation speed for
Mercury-generated C code is often faster when using `gcc -O1' rather
than `gcc -O0'.


--
Fergus Henderson <fjh@cs.mu.oz.au>
WWW: <http://www.cs.mu.oz.au/~fjh>
PGP: finger fjh@128.250.37.3


Post a followup to this message

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