Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Optimize Code In Options

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
TSEYFARTH

Bascom Member



Joined: 01 Jul 2006
Posts: 1048

usa.gif
PostPosted: Sat Feb 02, 2008 11:41 pm    Post subject: Optimize Code In Options Reply with quote

What does this do?

Thanks
Tim
Back to top
View user's profile
TSEYFARTH

Bascom Member



Joined: 01 Jul 2006
Posts: 1048

usa.gif
PostPosted: Sun Feb 03, 2008 8:16 am    Post subject: Reply with quote

I have seen it reduce compiled file size by about 6 % but am curious what else it does - it does....

Tim
Back to top
View user's profile
mattcro

Bascom Member



Joined: 03 Oct 2007
Posts: 324
Location: Scotland

uk.gif
PostPosted: Sun Feb 03, 2008 7:24 pm    Post subject: Reply with quote

I'm also curious about the optimizations. Code size is usually slightly smaller with optimizations enabled, but what about execution speed? One poster reported on some testing and said optimization made his test program run slower.

There doesn't seem to be any documentation about optimizations, except for a tiny bit in the manual which isn't much help:
Quote:
This options does additional optimization of the generated code.
Since it takes more compile time it is an option.

_________________
If all else fails, read the manual. Even better: read the manual before something fails. If you can't find it in the manual, search the forum.
BascomAVR 2.0.8.2
Back to top
View user's profile
k5nwa

Bascom Member



Joined: 01 Feb 2008
Posts: 12
Location: NW Arkansas, USA.

usa.gif
PostPosted: Sun Feb 03, 2008 8:05 pm    Post subject: Optimization speed. Reply with quote

I'm having a weird effect but it has to do with the fiuse settings;

I had the /8 fuse set on a ATMEGA88 (default) and if you turned on optimization the program ran 8X slower, and the delays were off by a factor of 8X. Once I flipped the bit then the difference between optimization or not optimizing went away. So it kind of looks like optimization and the fuses are combining to gang up on my little program, so I have it turned optimization off until someone figures out why it's acting so weird.

_________________
Cecil
k5nwa
"Blessed are the cracked, for they shall let the light in."
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
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
You cannot attach files in this forum
You cannot download files in this forum