Yes, G is your ZKey xor z[a]
;
G has to update old ZKey to new one using only information about what has changed.
Computing polynomial is equal to your xor way, since xor is equal (in terms of randomness) to adding. It's just about changing the coefficients, which are random from the beginning, so doing anything with them would be pointless.
So I think xor is the way to go.
And I am nearly completely sure that a) barely has any potential. In the end you have to perform ZKey % TABLE_SIZE. Anything you do before that counts as b).
You can(and have to) only set TABLE_SIZE to some prime number.
Don't listen to iMalc's advice on that. As you're only xor-ing, high and low bits are not mixing together, until the very end, so and'ing ZKey would completely waste it's high bits, and so: z[]'s high bits. And you need all the bits, otherwise you could use eg 16-bit ZKey from the beginning, and that you obviously do not want.
So my final conclusion is:
You already got good function. I don't think there's a way to improve it.
Yeah, cruel... :/
/def