State of the Art Denormal Prevention

This is now included in JUCE!

Thanks @chkn and @fabian !

This thread is 2 years old so I wanted to check if this is still the way to go to deal with denormals in desktop audio plugin development. Also, has anybody an opinion on how important this actually is for DSP code on desktop machines? (IIRs, DSP effects) I’m a bit surprised that I never really had to deal with denormals and I’m working in the industry for four years now…


Still relevant today. Newer CPUs are slightly better at denormal calculations (I think Pentium4 was the worst case), but it’s still a lot slower than regular numbers and if you want to keep your block processing times somewhat constant, the audio thread should avoid denormals at all cost. ScopedNoDenormals works well. IIR filters are very likely to go into denormal territory at some point and denormal numbers are in general useless for audio signals.

Especially with low cut-off frequencies and input signals that fade-out. I was very surprised seeing my plug-in using a ridiculously huge amount of CPU when filtering silence :smiley:

1 Like

I feel obligated to add to this seeing as this thread is newly active. This only affects multi-threaded audio processing.

I was struggling with a critical (but very infrequent) slowdown in my audio thread (specifically inside a reverb processor that handle very small numbers frequently), I avoided thinking it was a denormal issue because I already disabled denormals in my main audio thread.

You have to call FloatVectorOperations::disableDenormalisedNumberSupport(true); or add ScopedNoDenormals nsd; on each separate thread. It isn’t enough to just call it in the main audio thread.


A bit late but thanks for your replies! Will take this into account for the future.