473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

C space optimization

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
2 1575
weaknessforcats
9,208 Expert Mod 8TB
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
clmp75
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

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

Similar topics

12
by: WantedToBeDBA | last post by:
Hi all, db2 => create table emp(empno int not null primary key, \ db2 (cont.) => sex char(1) not null constraint s_check check \ db2 (cont.) => (sex in ('m','f')) \ db2 (cont.) => not enforced...
13
by: Madison Kelly | last post by:
Hi again, Something I have been wondering about and haven't found an answer to yet is how the size of a datatype (I hope that is the right term) effects performance. What effect is there if I...
18
by: robert | last post by:
Using global variables in Python often raises chaos. Other languages use a clear prefix for globals. * you forget to declare a global * or you declare a global too much or in conflict * you...
16
by: junky_fellow | last post by:
Hi guys, Consider the following piece of code: func() { if(x==0) { int arr; /* do something */
4
by: Konstantin Andreev | last post by:
Recently I was engaged in the database optimization for one big commercial application. During this business I was greatly astound by the fact that it's impossible in DB2 to get the accurate size of...
5
by: wkaras | last post by:
I've compiled this code: const int x0 = 10; const int x1 = 20; const int x2 = 30; int x = { x2, x0, x1 }; struct Y {
21
by: Peter Olcott | last post by:
I got the previous alias to std::vector working, and found that it takes up the space of a pointer. I want to find a way to do an alias to a std::vector that does not take up any space. Is there...
4
by: bharath539 | last post by:
how to write programmes which minimizes time and space complexities let suppose for linked lists related programmes
20
by: Ravikiran | last post by:
Hi Friends, I wanted know about whatt is ment by zero optimization and sign optimization and its differences.... Thank you...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.