Skip to content
heliaDSP
User guide
HELIA HUB

Measurements

heliaDSP’s measurements of cycles, flash and accuracy follow, each with the configuration it was taken in. Numbers are not comparable across configurations; a cycle count depends on the chip, clock mode, compiler, optimization level, kernel selection, memory placement and source revision, and each table states these.

Helium, or MVE, is the vector extension of the Cortex-M55 in Apollo510. “Helium kernels” are CMSIS-DSP’s handwritten intrinsic code; “portable kernels” are its C code compiled with ARM_MATH_AUTOVECTORIZE, which heliaDSP v1.0.0 used by default on NSX boards. ATfE is Arm Toolchain for Embedded, Arm’s LLVM-based compiler.

Helium against portable kernels, and ATfE against GCC

Section titled “Helium against portable kernels, and ATfE against GCC”

Configuration: Apollo510 EVB; CPU at 96.6 MHz (low-power mode, clock measured against the 32.768 kHz timer at each boot); -O2, no -ffast-math; DISABLEFLOAT16=ON; inputs and outputs in shared SRAM, library tables where the linker places them (MRAM, the chip’s non-volatile code memory); cycles counted with the Cortex-M cycle counter (DWT) around the process call only, median of 5 runs after 2 warm-up runs. Source: heliaDSP v1.0.0 (commit 07a11b73, Arm upstream 2aa0b18a), library built through its own CMake. Compilers: arm-none-eabi-gcc 14.2.1 and ATfE 22.1.0. Measured 2026-08-19. Every test in the table passed its accuracy check against a float64 reference in all four configurations.

Median cycles per call:

Test GCC portable GCC Helium ATfE portable ATfE Helium Helium gain, GCC Helium gain, ATfE ATfE gain, Helium Fastest vs GCC portable
arm_cmplx_mag_f32, 480 samples 14,420 5,454 13,939 5,562 2.64 2.51 0.98 2.64
arm_rfft_fast_f32, N = 256 11,081 5,088 9,824 4,240 2.18 2.32 1.20 2.61
arm_rfft_fast_f32, N = 2048 105,458 43,769 97,987 36,065 2.41 2.72 1.21 2.92
arm_rfft_fast_f32, N = 4096 217,941 98,820 214,398 81,934 2.21 2.62 1.21 2.66
arm_fir_f32, 32 taps, 256 samples 22,144 8,090 12,883 5,703 2.74 2.26 1.42 3.88
arm_fir_f32, 128 taps, 256 samples 80,368 31,082 44,959 22,287 2.59 2.02 1.39 3.61
arm_biquad_cascade_df1_f32, 2 stages, 480 samples 18,339 11,202 9,838 6,622 1.64 1.49 1.69 2.77
arm_biquad_cascade_df1_f32, 4 stages, 480 samples 36,653 22,348 19,766 13,152 1.64 1.50 1.70 2.79
arm_mat_vec_mult_f32, 160 x 160 122,635 51,864 90,383 45,009 2.36 2.01 1.15 2.72
arm_mat_vec_mult_f32, 432 x 144 324,845 155,650 248,207 138,511 2.09 1.79 1.12 2.35
arm_sin_f32, 480 calls 24,019 24,019 23,535 23,535 1.00 1.00 1.02 1.02
arm_cos_f32, 480 calls 24,831 24,831 24,015 24,015 1.00 1.00 1.03 1.03

The four right-hand columns are ratios of cycle counts: portable over Helium for one compiler; GCC Helium over ATfE Helium; and GCC portable, v1.0.0’s NSX default, over the fastest of the four configurations. The biquad Helium figures use arm_biquad_cascade_df1_mve_init_f32.

From the table:

  • For one compiler, the Helium kernels took 1.5 to 2.7 times fewer cycles than the portable kernels for every measured function that has a Helium kernel. arm_sin_f32 and arm_cos_f32 are a table lookup with linear interpolation and have no Helium kernel.
  • ATfE took fewer cycles than GCC from the same source in every configuration except the Helium complex magnitude: up to 1.9 times fewer with portable kernels (biquad) and 1.7 with Helium kernels (biquad).
  • Against v1.0.0’s default, the fastest configuration took 2.3 to 3.9 times fewer cycles.

These measurements were repeated at the qualified CMSIS-DSP commit 7669e883 on 2026-10-02 with the method unchanged. Every row is within 2% of the values above except arm_mat_vec_mult_f32 with the Helium kernels, which took 2.7% to 4.0% more cycles: 53,785 (GCC) and 46,794 (ATfE) at 160 x 160, and 160,177 and 142,258 at 432 x 144. v1.0.0, rebuilt and run with the same day’s firmware image, shows the same increase, and the qualified commit matches it within 0.5%, so the difference comes from code and data placement in that image, to which the shared-SRAM-bound matrix-vector product is sensitive. The table above remains the table of record; the repeat is recorded in evb_pin7669e883_{gcc,atfe}_{helium,av}_lp.json and the control in evb_control_v100_07a11b73_{gcc,atfe}_helium_lp_2026-10-02.json of Ambiq’s internal measurement record. None of these measurements uses GCC 15.

The measurements were repeated at CMSIS-DSP commit 9046be7f (tag ambiq/2026.10.0) on 2026-10-13 with the method unchanged. Every row is within 2% of the 2026-10-02 repeat; the portable-kernel firmware images are byte-identical to that repeat’s and took the same cycles. Against the table above, every row is within 2% except arm_mat_vec_mult_f32 with the Helium kernels, which took 2.3% to 3.8% more cycles: 53,845 (GCC) and 46,661 (ATfE) at 160 x 160, and 159,241 and 142,172 at 432 x 144, the placement effect recorded for the 2026-10-02 repeat; the compiled matrix-vector kernel is the same at both commits. Every test in the table passed its accuracy check in all four configurations. The table above remains the table of record; the repeat is recorded in evb_pin9046be7f_{gcc,atfe}_{helium,av}_lp.json of Ambiq’s internal measurement record.

The measurements were repeated with the Helium kernels at CMSIS-DSP commit a0c120a7 (tag ambiq/2026.10.1) on 2026-10-19 with the method unchanged. That commit changes the last stage of the complex FFT that arm_rfft_fast_f32 calls (AmbiqAI/CMSIS-DSP pull request #53). Against the 2026-10-13 repeat, arm_rfft_fast_f32 took 1.5% to 1.6% fewer cycles with GCC (4,991, 43,123 and 97,074 at N = 256, 2048 and 4096) and 0.5% to 0.7% more with ATfE (4,241, 37,023 and 82,794), with the same maximum absolute error in every test; every other row is within 0.4% of that repeat. The portable-kernel firmware images are byte-identical to that repeat’s. Against the table above, every row is within 2% except arm_mat_vec_mult_f32 with the Helium kernels, 2.7% to 3.7% more cycles (the placement effect recorded for the 2026-10-02 repeat), and ATfE arm_rfft_fast_f32 at N = 2048, 2.7% more (37,023). Every test in the table passed its accuracy check. The table above remains the table of record; the repeat is recorded in evb_pina0c120a7_{gcc,atfe}_helium_lp.json of Ambiq’s internal measurement record.

At 250.7 MHz (high-performance mode) the same GCC Helium build took the same cycle counts as at 96.6 MHz for work that runs from cache and tightly coupled memory (for example arm_rfft_fast_f32 at N = 2048: 43,769 in both modes), and more cycles for work that streams data from shared SRAM, because memory wait states scale with the clock: arm_mat_vec_mult_f32 at 160 x 160 took 51,864 cycles at 96.6 MHz and 72,220 at 250.7 MHz. Same source, compiler and date as above.

Configuration: Apollo510 EVB, 96.6 MHz, -O2, Helium kernels, v1.0.0 source with the predicated matrix-vector tail loads that the upstream-tracking fork now carries, measured 2026-08-20. arm_mat_vec_mult_f32 on a 160 x 160 f32 matrix, median cycles:

Compiler Matrix in shared SRAM Matrix in DTCM Ratio
GCC 14.2.1 53,671 26,993 1.99
ATfE 22.1.0 46,412 19,776 2.35

DTCM is the Cortex-M55’s data tightly coupled memory. Up to 64 x 64 (a 16 KB matrix) the two placements took the same cycles; at 128 x 128 (64 KB) shared SRAM took 1.16 (GCC) and 1.15 (ATfE) times as many; at 160 x 160 (100 KB), the table above.

f32 real FFT: generic against per-length initializer

Section titled “f32 real FFT: generic against per-length initializer”

Configuration: Cortex-M55, -O2, -ffunction-sections -fdata-sections, --gc-sections, Helium build of v1.0.0, measured 2026-08-19. Flash is .text plus .rodata of a program that initializes and runs one real FFT, minus that of an empty program.

Program GCC 14.2.1 ATfE 22.1.0
arm_rfft_fast_init_f32(&S, 512) + arm_rfft_fast_f32 87,596 B 87,444 B
arm_rfft_fast_init_512_f32 + arm_rfft_fast_f32 9,308 B 9,192 B
arm_rfft_fast_init_f32(&S, 2048) + arm_rfft_fast_f32 87,596 B 87,444 B
arm_rfft_fast_init_2048_f32 + arm_rfft_fast_f32 29,264 B 29,144 B

The generic initializer’s program is the same size for every length because it links the tables of all lengths. Other functions, for comparison (GCC): FIR 2,104 B, biquad 996 B, matrix-vector product 900 B, complex magnitude 248 B, arm_sin_f32 2,208 B.

Q15 and Q31 real FFT: compact per-length tables

Section titled “Q15 and Q31 real FFT: compact per-length tables”

Configuration: Cortex-M55, -O2, unused sections removed; .text + .rodata + .data of a program using one fixed-length initializer, before and after the compact-table patch, pull request #7 of the upstream-tracking fork (recorded in its patch ledger):

Length Q15 before Q15 after Q31 before Q31 after
32 38,656 B 6,024 B 71,336 B 6,072 B
1024 42,060 B 13,392 B 77,188 B 19,856 B
4096 52,768 B 36,392 B 95,576 B 62,824 B
8192 75,300 B 75,304 B 136,540 B 136,552 B

Output is bit-identical with and without the patch. At the qualified CMSIS-DSP commit of 2.0.0, a Cortex-M55 link of a 256-point Q15 real FFT built with GCC 14.2.1 had 4,436 bytes of .text and kept only the 256-point table; the Q31 link, 5,908 bytes. tools/qualification/build.py checks this for every cross build.

Configuration as in the first table, Helium kernels. Maximum absolute error against a float64 reference computed from the same float32 inputs, over the test cases of each function (the sizes in the cycle table plus smaller and odd shapes), and the same error divided by the largest reference magnitude of its test case. GCC and ATfE gave the same values except for the biquad.

Function Maximum absolute error As a fraction of the largest reference magnitude
arm_sin_f32, arm_cos_f32 1.88e-5 1.9e-5; equals the error bound of a 512-entry table with linear interpolation
arm_cmplx_mag_f32 4.8e-7 1.5e-7
arm_rfft_fast_f32, N = 32 to 4096 3.1e-5 (at N = 4096) 1.9e-7
arm_fir_f32 3.0e-7 1.1e-7
arm_biquad_cascade_df1_f32 2.9e-6 (GCC), 1.4e-6 (ATfE) 1.4e-6 (GCC), 7.1e-7 (ATfE)
arm_mat_vec_mult_f32, up to 432-term dot products 5.4e-7 3.1e-7

The portable kernels gave errors of the same order (largest fraction 8.2e-7, biquad).

On the Corstone-300 simulator at the qualified CMSIS-DSP commit of 2.0.0, 64-point complex FFTs built with ATfE 22.1.0 or GCC 14.2.1 had maximum absolute error 5.4e-07 (f32), 6.3e-08 (Q31) and 3.8e-03 (Q15) against a double-precision DFT (COMPATIBILITY.md); with GCC 15.2.1 and the Helium kernels, 1.2e+04, 14.1 and 14.1 (see Toolchains).

Configuration: Apollo510 EVB, 96 MHz boot clock (measured 96.6 MHz), caches on, code in MRAM, buffers in MCU TCM; helia_dsp compiled by its CMake at -O3 with section flags; median of nine calls after two warm-up calls, interrupts masked; dense input, (29i mod 101) − 50; 320 samples, six levels. “PR #17/#18” is the experiment’s code from helia-dsp pull requests #17 and #18, compiled into the same image with its own flags. All entry points passed the 1,862-configuration test corpus on the board under both compilers.

Forward transform, cycles:

Compiler Wavelet Reference Scalar Helium Helium/scalar PR #17 scalar PR #17 Helium
ATfE 22.1.0 bior4.4 165,640 46,894 14,354 3.27 95,400 25,588
ATfE 22.1.0 Coif5 467,968 113,587 34,343 3.31 207,157 82,911
GCC 14.2.1 bior4.4 114,828 44,801 16,179 2.77 75,119 27,092
GCC 14.2.1 Coif5 322,644 115,359 36,610 3.15 144,789 69,623

Inverse transform, cycles:

Compiler Wavelet Reference Scalar Helium Helium/scalar PR #18 scalar PR #18 Helium
ATfE 22.1.0 bior4.4 86,944 38,695 29,987 1.29 88,873 45,869
ATfE 22.1.0 Coif5 241,264 99,430 52,864 1.88 247,975 110,665
GCC 14.2.1 bior4.4 77,014 39,647 35,398 1.12 63,846 46,298
GCC 14.2.1 Coif5 218,728 100,347 59,542 1.69 182,652 114,850

Flash added by one entry point to a program that only initializes an instance (code, tables and library functions it calls, --gc-sections): helia_dwt_forward_f32 2,526 bytes under ATfE and 1,932 under GCC; helia_dwt_inverse_f32 1,458 and 1,464. The experiment’s wavelet_forward adds 7,042 and 3,376 bytes, because its run-time choice of implementation keeps all of them in the image. Stack used by one call, measured by painting: 108 to 140 bytes for every entry point under both compilers; the experiment’s Helium forward used 576 bytes (ATfE) and 348 (GCC).

Across frames of 8 to 2048 samples and one to six levels, the Helium forward transform took 1.65 to 3.5 times fewer cycles than the scalar one, and the Helium inverse 1.04 to 1.91 times fewer. The results for every frame size are in Ambiq’s internal measurement record. The stack of each entry point is part of its contract: it is stated at the declaration in helia/include/helia/helia_dwt.h and in Discrete wavelet transform.

Configuration: Apollo510 EVB, 96 MHz boot clock (measured 96.7 MHz), caches on, code in MRAM, window in MCU TCM; helia_dsp and CMSISDSP compiled by their CMake at -O3 with section flags, the comparison code at -O3 without fast-math or contraction; median of nine calls after two warm-up calls, interrupts masked; PPG-DaLiA windows (wrist BVP for 320, 512 and 1500 samples; six channel-major 52-sample chest-accelerometer windows, the layout of the imu-kit measurement, counted per window). With the window in shared SRAM the cycles differ by at most 1 per window. All entry points passed the test corpus on the board under both compilers, ATfE 22.1.0 and GCC 14.2.1.

Cycles per window. “General + mean, std” computes, with the helpers and sqrtf, the four values that the CMSIS-DSP sequence arm_mean_f32, arm_std_f32, arm_min_f32, arm_max_f32 returns; “general + mean, var” the two that arm_mean_f32 with arm_var_f32 returns.

Compiler N General General + mean, std Four CMSIS-DSP calls General + mean, var arm_mean_f32 + arm_var_f32 Scalar Reference
ATfE 22.1.0 52 243 327 644 306 294 420 7,990
ATfE 22.1.0 320 927 1,011 2,266 990 844 2,069 48,740
ATfE 22.1.0 512 1,407 1,491 3,418 1,470 1,228 3,233 77,924
ATfE 22.1.0 1500 3,877 3,961 9,346 3,940 3,204 9,214 228,100
GCC 14.2.1 52 253 342 724 316 322 481 4,950
GCC 14.2.1 320 939 1,028 2,683 1,002 874 2,507 30,158
GCC 14.2.1 512 1,419 1,508 4,075 1,482 1,258 3,947 48,206
GCC 14.2.1 1500 3,889 3,978 11,238 3,952 3,234 11,357 141,078

For the mean and variance alone, arm_mean_f32 followed by arm_var_f32 takes 4 to 19% fewer cycles than the general entry point under ATfE; its variance is two-pass about an f32 mean, whose rounding error enters the variance squared, so its relative error grows with the ratio of the mean to the spread: below 2e-6 up to a ratio of 10^3 and 1e-3 to 3.6e-3 at 10^5 over the measured sizes (host, 16 windows per size), where the general entry point stays below 1.7e-5.

A one-pass prototype that sums raw values and their squares in four lanes (from heliaML’s benchmark) takes 728 cycles at 320 samples under ATfE, 21% fewer than the general entry point, because it issues four vector operations per four samples where the general entry point issues six (it forms each deviation from the shift and accumulates it). Its variance, the difference of two nearly equal sums, has relative error 3e-5 to 7e-5 at a mean-to-spread ratio of 10, 4e-3 to 7e-3 at 100 and 0.25 to 0.68 at 1000.

Flash added by one call on a 320-sample window to a program that calls nothing (--gc-sections): helia_window_stats_f32 312 bytes under ATfE and 352 under GCC, of which the general entry point is a 4-byte branch and the rest the Helium kernel; the map file holds no other window-statistics kernel. With the mean and standard deviation helpers and sqrtf, 404 and 840 bytes; the four CMSIS-DSP calls, 864 and 924. Stack per entry point is stated in the header.

  • Energy, on any operation.
  • Any cycle count with Armclang.
  • Any SoC other than Apollo510; the Cortex-M4 parts (Apollo3, Apollo4) have no Helium.
  • f16 and fixed-point cycle counts, except the fixed-point FFT parity test, which records cycles but is a correctness test.
  • Arm’s CMSIS-DSP test suite, in heliaDSP or in the upstream-tracking fork.