Loading...
 
Skip to main content

System Workbench for STM32


FPU going too slow

Thanks guys, I actually had the answer of "1.0f" elsewhere as well and it was my main problem. It does indeed by standar convert every float constants to a double precision float, causing the float operations to be done in soft mode and not hard (-> super slow).

my compiler optimisation was already to o3.

Thanks Matt, that's a very good method. I will try that for the critical parts of my program.
Some other leads that I've been given : run some parts of the code from the RAM and not the flash (some info here), use integer phasor (it's better for audio applications as it diminishes jitter. Also most operations on int are faster) although I couldn't do that yet considering the other parts of my program. One last lead was to choose a suited clock frequency (apparently, because of wait states, clocking faster doesn't always speed things up somehow. I have a little explanation test from stackexchange if you guys are interested, I myself haven't yet understood :P)
Do you advise to compile with optimization for the dissassembly? because when optimized, it gets really messy!
Also shouldn't compiler's optimization try to limit unecessary register loads and stores?

Thanks again for helping me!

Florent

 
Collapse/expand modules below