Added hashing optimisation when the new hash can be easily calculated from the last