By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,694 Members | 1,847 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,694 IT Pros & Developers. It's quick & easy.

C space optimization

P: 6
So Im working on this project that is written in C that has a certain space limit on the size of the program. So far I have 15% free. If i use the #peephole, I can get 16% free. I would like to get a lot more space freed up but I am unsure of how to do so. The code itself is fairly optimized for speed and we are using a DSP56k processor. Any suggestions would be appreciated! thank you
Dec 3 '07 #1
Share this Question
Share on Google+
2 Replies


weaknessforcats
Expert Mod 5K+
P: 9,197
Usually, optimizing for speed is at odds with optimizing for size since the larger size usually runs faster by avoiding unnecessary function calls.

I have no suggestions other than goinf though the code and eliminating all extraneous usage, like repetitive literals, unnecessary variables, duplicate code, etc.

Presumably, the code has been through an optimizer.
Dec 3 '07 #2

P: 6
I got my space freed up a lot more just by changing some of the compiler options. I was using a new program so i was unaware of where some of these options are. Thanks for your help!
Dec 4 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.