We need to compute the ratio between wave functions, in particular for the Slater determinants.
R =\sum_{j=1}^N d_{ij}(\mathbf{r}^{\mathrm{new}})\, d_{ji}^{-1}(\mathbf{r}^{\mathrm{old}}) = \sum_{j=1}^N \phi_j(\mathbf{r}_i^{\mathrm{new}})\, d_{ji}^{-1}(\mathbf{r}^{\mathrm{old}})What this means is that in order to get the ratio when only the i-th particle has been moved, we only need to calculate the dot product of the vector \left(\phi_1(\mathbf{r}_i^\mathrm{new}),\,\dots,\, \phi_N(\mathbf{r}_i^\mathrm{new})\right) of single particle wave functions evaluated at this new position with the i-th column of the inverse matrix \hat{D}^{-1} evaluated at the original position. Such an operation has a time scaling of O(N) . The only extra thing we need to do is to maintain the inverse matrix \hat{D}^{-1}(\mathbf{x}^{\mathrm{old}}) .