Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Ads

Discussion Groups

Discussion Groups | TMS320C54x | Reg: Optimization

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

Reg: Optimization - Giridhar Tammana - Jul 12 8:48:39 2006



Hi all,

I'm optimizing code for C64x which was optimized for x86.
In that code lot of lookups were used. I optimized some code by 
removing those lookups with the math (reads need 5 cycles).

Are there any other things that should be kept in mind?
like var types static, const.

Thanks,
Giridhar.



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

Re: Reg: Optimization - Jeff Brower - Jul 12 9:12:01 2006

Giridhar-

> I'm optimizing code for C64x which was optimized for x86.
> In that code lot of lookups were used. I optimized some code by
> removing those lookups with the math (reads need 5 cycles).
> 
> Are there any other things that should be kept in mind?
> like var types static, const.

1) Try to adjust loops so size of critical loop code fits in cache -- that includes
any function calls made by the loop, arrays or other structures used, etc.  You have
to look at the .map file to be sure.  One little step outside cache during a crucial
loop and you will take a major hit.

2) Any floating-point operations?

3) x86 code often is wasteful with memory.  Just a few bits used in arrays of 32-bit
words, tables of pointers to more pointers, etc.  Memory is cheap on a PC but not an
embedded DSP board.  Suggest to take a close look at use of mem.

-Jeff

PS. You should post this question on c...@yahoogroups.com.



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )