DSPRelated.com
Forums

Need of efficient Sorting algorithm for C64x

Started by venk...@yahoo.co.in May 28, 2008
Hello,

I have a project with a downsampling filter on C6713.
When using the normal routine, the result is pretty much what I have in Matlab (errors are 1e-10), but this non optimised routine is taking something like 2 cycles per tap.

When I am optimising it (still the same routine in C, but with optimisation directives for the compiler), the routine takes 1/2 cycle per tap, but there is a small error. the error is approx 1e-7 which is quite low, but that I cannot explain.

Can somebody help me understand what can be the difference in calculations between optimised and non optimised version.

Thanks
Christophe,

On Tue, Jul 1, 2008 at 5:20 AM, christophe blouet
wrote:
> Hello,
>
> I have a project with a downsampling filter on C6713.
> When using the normal routine, the result is pretty much what I have in
> Matlab (errors are 1e-10), but this non optimised routine is taking
> something like 2 cycles per tap.
>
> When I am optimising it (still the same routine in C, but with optimisation
> directives for the compiler), the routine takes 1/2 cycle per tap, but there
> is a small error. the error is approx 1e-7 which is quite low, but that I
> cannot explain.
>
> Can somebody help me understand what can be the difference in calculations
> between optimised and non optimised version.

There is not a fixed answer to your question the differences vary with
different 'code patterns' and the 'optimizability' [from the
compiler's point of view] of the code. The best way to determine the
difference is to print out the '.asm' files to see what the compiler's
optimizer has done. The code that you see will often be almost
unrecognizable and might make your head hurt trying to follow it - the
assembler code path may be quite different than the 'C' that you
originally coded.

FYI - your error rate might also be different between 'max speed' and
'min memory' optimizations. You may be able to back off the level of
optimization and have an adequate performance level while picking up
some accuracy.

mikedunn
>
> Thanks
>

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php