Complete implementation of VarianceDiff.