The program was compiled with Keil C compiler and the object size was well under 8 kbytes. When I tried SDCC C Compiler and the size was over 12 kbytes ! and it could not fit inside 8k limited flash memory 8051 microprocessor. Is there any way to improve C compiler performance using optimitzation option to reduce it to under 8 kbytes ?
Nope, all optimizations are on by default. You will have to find out what is using the most space and try to optimize that yourself.