Eggdev: Re: [cvslog] (2005-03-02 17:22:54 UTC) Module eggdrop1.9: Change committed!

Darko Ilic darko at onvol.net
Thu Mar 3 11:06:06 CST 2005


Hello Bryan,

> 
>+	/* This 100 allows (ht->max_rows) linked lists each with an average of 100 elements in the list
>+         * before actually resizing.
>+         * This is done to avoid a very slow and cpu intensive resize which requires recalculating all hashes.
>+         * Having (ht->max_rows) linked lists is still more effecient than one large linked list.
>+         */
>
I am glad you understood the code but it seems you are still slightly 
confused about this ;)
Resizing does not require calculating all hashes again, but simply their 
relative positions in the table. Perhaps you could commit again with the 
different wording of the comment, so to clear this out once and for all? 
Mentioning that coder had in mind evenly populated hash table wouldn't 
go amiss. (hostnames, handles, help topics - all examples of such data, 
in my opinion)

Regards,

Darko





More information about the Eggdev mailing list