There was probably some other (faster) method to do that.

Can't see how. PDM has constant RMS value to start with, you have to filter out the high frequencies

to measure the energy content of the low frequency signal, and IIR is usually pretty efficient for that.

And to get the RMS you have to square and add and divide and square-root.

The other approach would be to take the FFT, sum the energy of the low frequencies, but that's O(N log(N)),

as opposed to O(N) for the obvious approach.

You might be able to decimate-in-time after the IIR to reduce the number of samples to sum for the RMS step,

presumably the signal bandwidth is a lot less than the pulse rate.