public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Optimization Safety
@ 2003-05-24 11:02 John Anthony Kazos Jr.
  2003-05-24 13:02 ` LLeweLLyn Reese
  0 siblings, 1 reply; 2+ messages in thread
From: John Anthony Kazos Jr. @ 2003-05-24 11:02 UTC (permalink / raw)
  To: gcc-help

I know that for some things, like GCC itself, or like GLibC, it's dangerous 
to screw around with the default optimization settings, but what about for 
random package X? Just how safe are the optimization algorithms? Let's say 
I compile with -O3, and it compiles and installs successfully, and seems to 
give no immediate horrific failures when running, is that good enough for a 
production system? Or can there be some tiny timebombs hidden in there 
because of some strange construct the package writer used?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Optimization Safety
  2003-05-24 11:02 Optimization Safety John Anthony Kazos Jr.
@ 2003-05-24 13:02 ` LLeweLLyn Reese
  0 siblings, 0 replies; 2+ messages in thread
From: LLeweLLyn Reese @ 2003-05-24 13:02 UTC (permalink / raw)
  To: John Anthony Kazos Jr.; +Cc: gcc-help

"John Anthony Kazos Jr." <jkazos@vt.edu> writes:

> I know that for some things, like GCC itself, or like GLibC, it's
> dangerous to screw around with the default optimization settings, but
> what about for random package X? Just how safe are the optimization
> algorithms? Let's say I compile with -O3, and it compiles and installs
> successfully, and seems to give no immediate horrific failures when
> running, is that good enough for a production system? Or can there be
> some tiny timebombs hidden in there because of some strange construct
> the package writer used?

The easy answer is to go with the rumor that -O2 is the most
    well-tested set of optimimzation flags, and use that.

The right answer, (i.e., the hard way) is to develop a through set of
    test cases, and run them at severl optimization levels, and if you
    discover a difference, file a bug report, and reduce your default
    optimization level. (Here, I assume you have previously
    established a need for using the best possible optimization.)

Note that glibc is quite large, since it included every unix c library
    extension ever concieved, contains a fair portion of unusual
    constructs, and, most importantly, has extrodinarily stringent
    correctness demands, since nearly every program on a glibc-based
    system depends on it (Some of them (mis)using it in unusual
    constructs.) 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-24 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-24 11:02 Optimization Safety John Anthony Kazos Jr.
2003-05-24 13:02 ` LLeweLLyn Reese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).