In message <[EMAIL PROTECTED]> you write:
>
> I don't think implementors will do such a thing like val%table_size.
> They can as well try to do a simple operation like
> (val & MAXINT)%table_size
> to reduce such problems to some extent.
val%table_size == (val&MAXINT)%table_size if (val > 0). But there's
no need to get rid of this bit if val is already unsigned. You're
really better off to do this: ((unsigned)(val))%table_size. This is
virtually never more than a asm single instruction, even though the
integer modulus operation can be very expensive on some machines.
-------------------------------------------------------------------------------
Lee Iverson SRI International
[EMAIL PROTECTED] 333 Ravenswood Ave., Menlo Park CA 94025
http://www.ai.sri.com/~leei/ (650) 859-3307