Kahan summation in `sum`?

Yes, but not just linear indexing and not just sum — sufficiently large AbstractArrays (and lazy broadcasts) use a recursive divide and conquer strategy for most reductions. The size cutoff varies by operator.

This is why we have both reduce (whose order of traversal is unspecified) and foldl/foldr.

5 Likes