Connecting Tech Pros Worldwide Help | Site Map

Currently doing development using C language, for final product, reduce code size?

Member
 
Join Date: Oct 2009
Posts: 87
#1: 2 Weeks Ago
Currently I am doing development using C language, I have all debugging symbols and all enabled, for final product, I don't want all debugging symbols and all, I want very less code size, can I do it?. also is there anyway I can do some performance tuning for C code?. any tools?.

Thanks.
Expert
 
Join Date: Mar 2008
Location: Naperville, Illinois U.S.
Posts: 828
#2: 2 Weeks Ago

re: Currently doing development using C language, for final product, reduce code size?


The method for enabling and disabling debug capability depends on which compiler and/or IDE you're using.
Newbie
 
Join Date: Nov 2009
Posts: 20
#3: 2 Weeks Ago

re: Currently doing development using C language, for final product, reduce code size?


Also, optimizations for your code can be enabled in many compilers to increase speed and often remove dead code, cutting down size.
Member
 
Join Date: Aug 2008
Posts: 121
#4: 1 Week Ago

re: Currently doing development using C language, for final product, reduce code size?


As donbock and Ectara pointed out tell us which environment you use and we can point you to which tools to use.
Member
 
Join Date: Oct 2009
Posts: 87
#5: 1 Week Ago

re: Currently doing development using C language, for final product, reduce code size?


Thanks. Right now I got some code from chip vendor, I am not using all the modules, looking for some tool which should pointout which code is not using and I wpuld like to disable that code then it should improve the CPU performance. also for timebeing enabled all debugging symbols and for final product, don't need these. Looking for some performance tuning tools too.
Expert
 
Join Date: Mar 2008
Location: Naperville, Illinois U.S.
Posts: 828
#6: 1 Week Ago

re: Currently doing development using C language, for final product, reduce code size?


Code that doesn't execute is sometimes called 'dead code'. Removing dead code does nothing to improve CPU performance because 0% of the CPU is used to [not] execute the dead code.

Removing dead code will reduce the size of your executable image, so your program consumes less memory and takes less time to launch.
Reply


Similar C / C++ bytes