optimized EarthMoversHistogramDiff