CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Optimization levels

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
RainerGund



Joined: 15 Oct 2003
Posts: 1
Location: Wiesenbach, Germany

View user's profile Send private message Visit poster's website

Optimization levels
PostPosted: Wed Mar 31, 2004 12:50 am     Reply with quote

Hi,

is there any further explanation about the functionality of the different optimization levels ?
Will it have any effect on code or memory size by changing it on the same source code ?

Tanks

R.Gund
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Wed Mar 31, 2004 2:23 am     Reply with quote

Yes it does have big effects on the code/memory size. I've experienced size differences up to %10 between #opt 0 and #opt 9 on the same source code.
ajt



Joined: 07 Sep 2003
Posts: 110

View user's profile Send private message

Optimization Levels
PostPosted: Wed Mar 31, 2004 11:19 pm     Reply with quote

Not clear why one would ever want to set a low optimization level unless this directive is the same as "bug threshold" (or inverse thereof). The manual says that the directive "may also be used if an optimization error is suspected"!

So how is one to know what to use so as to not incur latent bugs!?!
_________________
Al Testani
regan



Joined: 10 Sep 2003
Posts: 5
Location: Wellington, New Zealand

View user's profile Send private message Send e-mail

Optimisation Levels
PostPosted: Thu Apr 01, 2004 2:28 am     Reply with quote

The optimisation levels are important to me at the moment as there is a bug in some of the RAM addressing in the most recent version of the PCH compiler. To get around it I need to set the opt level to 5 which uses 'conservative' switching of RAM banks. This has the undesirable effect of increasing my code size by over 12%. Meanwhile, I still have useable code until CCS find time to fix the bug. Normally, I would set the opt level to as high as possible.

Regan.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group