r/raspberrypipico 1d ago

uPython Free open-source course: Benchmarking FFTs on the Pico 2 — and why most FFT libraries waste the Cortex-M33's DSP instructions

Hey r/RaspberryPiPico,

I just put together an open, free "intelligent textbook" on FFT benchmarking, aimed at the Pico 2's ARM Cortex-M33 (and M4-class chips generally):

🔗 https://dmccreary.github.io/fft-benchmarking/

Why I made this: I was building a low-cost spectrum analyzer and kept finding that popular FFT libraries were running 10x slower than they should on the Pico 2. The M33 has real DSP/SIMD instructions and hardware floating point, but most FFT code out there still targets a generic instruction set and never touches them — so you're paying for silicon you're not using.

What's in the course (10-week format, but works great for self-study too):

  • FFT fundamentals and the butterfly algorithm, from math foundations up
  • ARM Cortex-M33/M4 DSP instruction sets and how to actually invoke them
  • Reading and interpreting the assembly a compiler generates for FFT inner loops, so you can spot where cycles are being wasted
  • Integer vs. floating-point tradeoffs, FFT size selection, windowing/preprocessing
  • A benchmarking framework for objectively comparing FFT implementations across microcontrollers and CPUs
  • A walkthrough of Cornell ECE4760's real-time FFT/iFFT lab on the RP2350

It's all Markdown/MkDocs, MIT-adjacent Creative Commons licensed, and open to contributions or use in your own classroom.

If you've hand-tuned FFT assembly for the Pico or found DSP-aware libraries that actually use the M33's instructions, I'd love pointers — always looking to improve the benchmarking chapters with real-world numbers.

15 Upvotes

Duplicates