Re: [Freetel-codec2] Encoding decoding time TIVA

2016-06-20 Thread David Rowe
> the M_PI is a good point though easily overlooked as doubling > everything Would have though the compiler would pick that up at compile time. Really need to see this assumption (and the other optimisations) tested on other machines - David -

Re: [Freetel-codec2] Encoding decoding time TIVA

2016-06-20 Thread glen english
On the PC, changing from single to double for large datasets starts to really hurt because the effective doubling of the dataset space starts to hurt you on cache misses ... Not such an issue on non cache single-cycle access SRAM type architectures. (though a 64 bit fetch from a 32 bit wide SRAM

Re: [Freetel-codec2] Encoding decoding time TIVA

2016-06-20 Thread David Rowe
Hello Maxime, Good work on you optimisation! I would be interested to see if similar changes produce the same performance gains on the STM32F4 platform. Would anyone like to try those changes, run some benchmarks, and post the results? When I performed optimisation work in the past, I wrote c

Re: [Freetel-codec2] Encoding decoding time TIVA

2016-06-20 Thread Bruce Perens
If you _really_ want high performance and low power consumption, get to work on that fixed-point port! See you next year! I think it would be reasonable to require benchmarks across divergent platforms with compiler switches and other configuration well documented before making this sort of change

Re: [Freetel-codec2] Encoding decoding time TIVA

2016-06-20 Thread Maxime Guyon
I'm agree with glen english for the float parts, use only double where it's necessary... Also Bruce, it seem that many CPU which can handle double operation can also handle simultaneous single float operation which will not reduce the speed... Saving cycle is important on embedded platform and ev

Re: [Freetel-codec2] Encoding decoding time TIVA

2016-06-20 Thread Steve
Max, that is interesting as I was under the impression -fsingle-precision-constant compiler switch handled all that. Great detective work! -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic pa

Re: [Freetel-codec2] Encoding decoding time TIVA

2016-06-20 Thread glen english
Max Nice work. Yes. indeed. all cases of float literals should have f after them I used to just force doubles to floats but I realised that was lazy programming so I think specific float f literal is important. In contrast to Bruce, I WOUL

Re: [Freetel-codec2] Encoding decoding time TIVA

2016-06-20 Thread Bruce Perens
Many, perhaps most, CPUs have a float type that is slower than double, because their internal hardware is double-only and they convert float to double and back to float on every operation. Don't change the main source to float types. Use macros, typedefs, or compiler switches. Also, David will pro

Re: [Freetel-codec2] Encoding decoding time TIVA

2016-06-20 Thread Maxime Guyon
Hello, Good news, after some work it seem I've got a working solution. @Steve, note that the CMSIS do not provide function for *atan2()* and *floor()...* First I've tested to do only single precision operation (do not allow double operation because M4 cannot handle double precision operation on