- July 1, 2014 at 11:58 am #31754
I am using the Android provided prebuilt MIPS compiler for compiling the speex audio resampler. I see the performance is very bad even after using the -mdspr2 and -O3 compiler flags. Some googling revealed that only the MIPS SDE compiler supports the optimized instructions. Now the only way forward for me is to re-write the core function of the re-sampler in assembly.
I would like to know is there any other alternate compiler/approach that can be used in order to optimize the code.
Thanks in advance,
manuJuly 24, 2014 at 1:20 am #38866
Need clarification from you. Are you referring library in external/speex/libspeex? If so, couple comments
1) I believe this library does offer either fixed point or floating point implementation. Floating implementation is default option. For 24KEc, please use fixed point implementation. We do have cores that do support FPU but just happen to be 24KEc does not have it.
2) 24KEc only support DSP ASE R1 so -mdspr2 flag should not be used. -mdspr2 should only be used for our higher end core that support DSP ASE R2 extension.
3) Another quick option for you is using -funroll-loops compiler option. By default, this should be disabled even with -O3. This library seem to have some nested loop. Unroll the loop might help.