The answer of the question this is marked duplicate of is wrong and does not satisfy my needs.
My code aims to calculate a hash from a seri
It looks like you can replace the inner loop and if with:
for j in range(length - i) val^=start+c c+=1 c+=i This should save some time when i gets bigger
for j in range(length - i) val^=start+c c+=1 c+=i
I'm afraid I can't test this right now, sorry!