In Accuracy and Stability of Numerical Algorithms, equation 1.6a, Higham gives the following update formula for the mean: $$ M_{1} := x_1, \quad M_{k+1} := M_{k} + \frac{x_k - M_k}{k} $$ Ok, one benefit of this update is that it doesn't overflow, which is a potential problem when we naively compute $\sum_{i=1}^{k} x_k$ and then divide by $k$ before any use.
But the naive sum requires $N-1$ adds and 1 division, and potentially vectorizes very nicely, whereas the update proposed by Higham requires $2N-2$ additions and $N-1$ divisions, and I'm unaware of any assembly instruction that can vectorize all this.
So it Higham's update formula worth using? Are there benefits I'm not seeing?
Note: Higham gives the following generic advice (Section 1.18 "Designing Stable Algorithms):
"It is advantageous to express update formulae as
newvalue = oldvalue + smallcorrection
if the small correction can be computed with many correct significant figures."
Update 1.6a does take this form, but it's not clear to me that the small correction can be given to many significant figures.
Edit: I found an empirical study of the performance of various methods of computing means, and 1.6a came highly recommended; see
However, it still wasn't clear to me after reading that paper that the update was worth the price; and in any case, I was hoping for a worst and average case bound by accumulating rounding errors.