| ??? 01/03/04 08:43 Read: times |
#61819 - RE: OT: C parameter by reference or by v Responding to: ???'s previous message |
A specific instance that can think of is where I create a subroutine just to breakup a larger program, and that subroutine is not called from anywhere else. A decent optimising compiler should inline this routine. No parameter passing ever takes place then. If your compiler can't do it, and speed matters to you more than good look of the C code, do this yourself. Even if the routine appears more than once, and you aren't short at eeprom, you can inline it where it belongs. Another method of speeding up the program is unrolling the loop. MOV R0,#5 LOOP: RR A DJNZ R0,LOOP will take WAY longer than RR A RR A RR A RR A RR A (digressing from SWAP, ANL etc) same applies to C for() etc. |



