We can get rid of this O(n^2) loop: https://github.com/Nek5000/parRSB/blob/master/src/con-periodic.c#L188