Scott Perry scperry@ucsd.edu wrote:
Agreed. Enforcing tables that are a power of 2 would make things very simple, but I don't think many compiler will optimize out the modulus because it would be against a variable. we might have to do something like hash & (tablesize - 1), as long as the table size is well-enforced.
Yes.
Yes, I tried to get the API for something like that right, but failed. If you look at the hash table structure, the iterator context is embedded there, I think it could be moved out to a extra parameter passed in by the caller. Suggestions of how to handle this (e.g. how its initialized correctly in the first place, if the iterator context should be opaque, etc.) are welcome.
This would be something to do in a later change, but I'll have a go on it once we're done with this change.
Awesome 8-)
And its completely unneeded. We already have a structure that has all the non-local connections (conn.c 'My_ConnArray'), we might be able to use it instead.
Ah, I missed that. This would be something good to change shortly after hash tables get merged in.
Heh. Alex...? 8-))
I'm doing some last rounds of testing this morning, and then I think the patches are good to go.
Great -- I'll review your changeset later today.