Friday, 15 August 2014

how to reduce size of text code in C language? -



how to reduce size of text code in C language? -

i trying cut down size of text in c (gcc )

when typed size command, text size 4096.

the programme simple

and then, when erased newline , initialization this,

the result same before.

i mean text size still 4096

how cut down size of text??

__text segment actual compiled code resides, not related straight size of source code file.

the important means of controlling code size belongs design - design programme correctly, avoid redundant logic. microoptimizations combining variable definition , initialization meaningless, compiler improve anyway. compiler has different optimization options, variating between speed improvement code size improvement. set optimization level minimal code size.

c

No comments:

Post a Comment