docs: private void updateCache(int size, double[] scratch, double[] bestd, int[] besti, int x, int y, int j, double d) {
      // New best
      if(d <= bestd[j]) {
        bestd[j] = d;
        besti[j] = y;
        return;
      }
      // Needs slow update.
      if(besti[j] == x || besti[j] == y) {
        findBest(size, scratch, bestd, besti, j);
      }
    }