GOF calculation speeded up