Mixer: optimize peak value measuring functions