??? 07/15/08 14:56 Read: times Msg Score: +2 +2 Good Answer/Helpful |
#156723 - Getting off-topic Responding to: ???'s previous message |
Erik Malund said:
if the C code is 27k and you need to cut it to 4k there are two possibilities: Somehow this got deviated from the original scenario. I was saying that my 23k program became 27k when I experimented with dropping my custom I/O routines in favor of printf. Then Alan mentioned he was working with a 4k code size limit. There was never any intent to make a 27k program fit in 4k. Personally, I'm now of the opinion that except for sections of code where you must know exactly how long they'll take, 'C' is usually a reasonable alternative for assembly language. Even a 4k code size limit can be written in 'C' if you write the routines yourself rather than using the 'C' libraries. Most 'C' compilers generate decent code and don't generate much extra bulk if you forgo their full-featured libraries. There are exceptions, of course. But if you know assembly language so you know what the 'C' compiler will try to generate, you can write 'C' code that has the readability of 'C' and the efficiency of assembly language. That allows you to code faster with fewer housekeeping errors, and more readability for the person that has to take over the project after you. Regards, Craig Steiner |