Speed up DownsampleFactorMaxGrad.perform
doc