I’m new to the Daisy but I have some experience with the Axoloti.
Today i have ported a decimation module I have done on the Axoloti to Daisyduino.
So, I was intrigued to compare the Axoloti (that runs at 168MHz) with the Daisy with the same modules.
I use “micro()” to get the timing, reject erroneous values and get a mean value then i divide the time between two sample block (1/1000 s = 1000us) by the time spent in the function.
Stunningly I obtain very similar performance between the Axoloti and the Daisy. Even when using the O3 option.
I expected a x2 ratio.
Your test is pointless, that function likely doesn’t give you accurate timing. You should read number of cycles used by your audio callback from DWT->CYCCNT register to get precise measurement in clock cycles. Then you can use that number and calculate time spent processing each sample block or sample based on MCU frequency (note that Daisy is currently clocked at 400Mhz rather than full MCU frequency of 480MHz)
Also, you will probably get better performance from -Os on Daisy as MCU cache would be used more effectively.
Regarding difference between STM32 F4/H7 MCUs, you can expect up to x4 improvement if patch is CPU bound and small or less than x2 if it’s bound by SDRAM latency and cache is not used effectively.
I’ve spent some time benchmarking OWL on different hardware (F4 & H7 MCU with different compiler and cache settings, memory layouts). Performance on H7 without cache typically drops about x3 times and can end up even lower than F4 level MCU. That would also explain why you don’t see better performance from -Os.
Cache is crucial for getting any sort of performance from H7. Once that is solved, you can get slight improvements by utilizing faster memory sections for dynamic memory before SDRAM.
I think that block processing (as opposed to “per sample processing”) will also help cache and register optimization. The Axoloti works with 16 sample blocks.
Off topic
About buzz…
the Axoloti has a TPA6132 for its line output. I think that it plays a role in preventing ground loop amplification of digital noises.
On the Daisy we have to externally connect analog ground with digital ground.
So yesterday i began to experiment with this.
When i connect both grounds through a 4R7 resistor the noise level is nearly 15dB lower than with a wire connection.