ARM-software / CMSIS_5

CMSIS Version 5 Development Repository
http://arm-software.github.io/CMSIS_5/index.html
Apache License 2.0
1.33k stars 1.08k forks source link

Do not check array limitations inside hot loop #421

Closed smeijer1234 closed 4 years ago

smeijer1234 commented 6 years ago

We are checking "array limitations" inside the hot loop here:

https://github.com/ARM-software/CMSIS_5/blob/d143b79da1e2734684fe29a987a1eeae9e2c8882/CMSIS/DSP/Source/FilteringFunctions/arm_conv_f32.c#L619

We should not be doing this inside the loop, as straight line code will allow for a lot more aggressive compiler optimisations and thus better performance.

christophe0606 commented 4 years ago

It is a general good practice for optimizing code. And we have not finished cleaning the library regarding this issue. But be ensured that we are aware of this problem and progressively cleaning the source codes.