  We propose an efficient method to compute the so-called residual phase that
appears when performing Monte Carlo calculations on a Lefschetz thimble. The
method is stochastic and its cost scales linearly with the physical volume,
linearly with the number of stochastic estimators and quadratically with the
length of the extra dimension along the gradient flow. This is a drastic
improvement over previous estimates of the cost of computing the residual
phase. We also report on basic tests of correctness and scaling of the code.
