On Sun, 11 Feb 2007, Reid Spencer wrote:
>> +    // If the hash table is now more than 3/4 full, or if fewer than 1/8 of
>> +    // the buckets are empty (meaning that many are filled with tombstones),
>> +    // grow the table.
>
> If I get this right, it could also shrink the table, right?

nope, just grow.

>> +    if (NumItems*4 > NumBuckets*3 ||
>> +        NumBuckets-(NumItems+NumTombstones) < NumBuckets/8)
>
> Since you've used this predicate twice and re-written it twice, why not
> make an inline  predicate function for it, so its clear what's going on?
> Something like "isTimeToReHash()" ?

Will do.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to