On Thu, Jan 5, 2012 at 3:57 PM, Rasmus Lerdorf <ras...@lerdorf.com> wrote:
> On 01/04/2012 11:49 PM, Laruence wrote:
>> Hi:
>>   there is one way  maybe is a good try.
>>
>>   when resize hashtable,  we don't just dobule the size,  instead, we
>> increase the hashtable size with a random delta
>>
>>  what do you think?
>
> Sorry, you lost me. How does that help? The problem is when we collide
> on a single hash key the resulting linked list traversion gets longer
> and longer as more colliding keys are added to that hashtable. Whether
> you double the size or grow it by some other factor doesn't change this.
No, No,

if we increase the table size with a random delta(the nTableMask will
also be random), then the collision will not be predictable.

thanks

>
> -Rasmus
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to