column momenta
Optimized moment calculation function