4 ms·
When targeting machines like Cortex-M4, be sure to add -Wdouble-promotion. Single-precision floats are executed in hardware, but double-precision floats are ex
by brandmeyer 7y ago
When targeting machines like Cortex-M4, be sure to add -Wdouble-promotion. Single-precision floats are executed in hardware, but double-precision floats are executed in software.
Called cos() when you meant cosf()? Done in software.
Multiplied by 2.25 when you meant 2.25f? Done in software.
-Wdouble-promotion will help you find those performance bugs.