Eggdev: Major flaw with 1.9 hash_table() functions (stdarg read)

Bryan Drewery lordares at shatow.net
Thu Mar 3 15:17:16 CST 2005


been playing around with different data structures hash_table/rbtree/avl 
for a few days looking to replace linked lists in a egg1.6 project of 
mine, got into egglib and then looked into eggdrop/hash_table.c and was 
using that for some profiling and noticed the large number of cells needed 
to resize a max_rows=1 hash table and that spawned my email.


Anyway, I think 100 is actually not too bad, we don't want the table being 
resized too often as that is still a loop through every element.. I dunno, 
10 doesn't sound too shabby either...
Resizing when too smalls sounds nice also...


(I'm slowly getting into 1.9 also)

That dns code I touched, I ended up copying over to my 1.6 project and 
found a few bugs in it, just haven't had a chance to fix them up in 1.9 
(mainly 'compressed' answers)

------
Bryan Drewery


On Thu, 3 Mar 2005, stdarg wrote:

>
> --- Bryan Drewery <lordares at shatow.net> wrote:
>>
>> I've been playing around/studying these functions for a while today and
>> noticed that there is a major flaw.
>> The idea of a hash table is to hash a value and jump directly to it's spot in
>> memory, without the need to loop any lists
>> (unless possibly because of collisions).
>
> Hey just out of curiosity, what were you doing with these functions? Are you
> writing a new module or just doing something on your own?
>
>
>
>
>
> __________________________________
> Celebrate Yahoo!'s 10th Birthday!
> Yahoo! Netrospective: 100 Moments of the Web
> http://birthday.yahoo.com/netrospective/
>



More information about the Eggdev mailing list