Mail Archives: djgpp/2002/04/19/07:15:14
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f
|
From: | eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Drawbacks with code optimization?
|
Date: | 19 Apr 2002 09:22:59 GMT
|
Organization: | Ericsson Erisoft AB, Sweden
|
Lines: | 27
|
Message-ID: | <a9onlj$d91$1@antares.lu.erisoft.se>
|
References: | <a9omu0$kgp$1 AT dahlia DOT singnet DOT com DOT sg>
|
NNTP-Posting-Host: | lws256.lu.erisoft.se
|
X-Newsreader: | TIN [version 1.2 PL2]
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Goh, Yong Kwang (gohyongkwang AT hotmail DOT com) wrote:
: Any drawbacks with turning on optimization when generating a production copy
: for distribution for usage?
No. Because you should be using optimisation while doing the
programming from the start.
: Is there a possibility that the compiler may mis-interprete the original
: program logic and rearrange the codes such that the program doesn't work as
: expected with optimization turned on, even though the program source is
: clearly OK?
No. This assumes there no bugs in the compilator and no strange ideas
of what clearly OK source means.
: How do we determine the level of optimization that is appropriate or
: suitable for a program, apart from experimentation? -O1, -O2 or -O3?
Start with -O2. Always use this from the beginning.
Then you could try higher levels or specific options and see if they
have any effect. This part is experimentation.
Right,
MartinS
- Raw text -