###### tags: `Embedded` # Soft Floating Point Performance on ARMv7M Cycle time of various operations using GNU libgcc. Probably using `gcc-arm-none-eabi-8` or `gcc-arm-none-eabi-9` juding from the time posted, the original author didn't mention the version. > The code has been generated for Cortex-M4 (Arm architecture v7EM) and runs on an NXP Kinetis K66. ## Float, Math | Operation | Min | Max | Avg | | -------- | -------- | -------- | -------- | | `__aeabi_fadd` | 50 | 54 | 52.8 | | `__aeabi_fsub` | 51 | 61 | 56.3 | | `__aeabi_frsub` | 53 | 63 | 58.4 | | `__aeabi_fmul` | 30 | 30 | 30.0 | | `__aeabi_fdiv` | 144 | 144 | 144.0 | ## Float, Conversion | Operation | Min | Max | Avg | | -------- | -------- | -------- | -------- | | `__aeabi_f2iz` | 13 | 13 | 13.0 | | `__aeabi_f2uiz` | 11 | 11 | 11.0 | | `__aeabi_f2lz` | 261 | 382 | 310.4 | | `__aeabi_f2ulz` | 194 | 307 | 239.4 | | `__aeabi_i2f` | 26 | 26 | 26.0 | | `__aeabi_ui2f` | 26 | 26 | 26.0 | | `__aeabi_l2f` | 28 | 29 | 28.5 | | `__aeabi_ul2f` | 28 | 28 | 28.0 | | `__aeabi_f2d` | 8 | 8 | 8.0 | ## My application `__aeabi_ui2f`: 11 `__aeabi_fmul`: 16 `__aeabi_f2uiz`: 2 `__aeabi_l2f`: 1 `__aeabi_fadd`: 2 `__aeabi_f2lz`: 5 `__aeabi_fsub`: 2 `__aeabi_fdiv`: 2 $3 * 26 + 6 * 30 + 1* 6 1 + 1 * 144 + 2 * 382 = 1227$ ## References 1. https://blog.segger.com/wp-content/uploads/2019/11/Bench_Comparison.pdf