Re: R: [AD] Allegro 5 new config routines, alpha 1

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Angelo Mottola wrote:

> All in all, most of our config entries will probably not have more than
> 3-4 subdir levels, resulting in 3-4 hash scans. If the hash function is
> fast enough (as I think it should be, but suggestions to improve it are
> welcome!) speed won't be an issue. About size, if we use say 512 entries
> tables, we have 16K per table, and even supposing to have 20 tables (one
> for each directory ever referenced), that's 320K which is not that big.
> At least IMHO.

I agree for a desktop machine it's not much. On the other hand, I
think thousands of unused entries is a waste by definition. Have you
made the hash table expandable? I assume so, as otherwise you'll run
into problems when too many entries for one table are made. If it is
already expandable, what's the big deal with just picking 16 entries
as a default, or even less, and letting those expand as more variables
are added? If it is not expandable, I think that should be
considered. If a user can use the config system for his/her own
variables, there is no guarantee that 4096 or even 16k is enough, and
by then the memory footprint _will_ become significant.

I think the 'user can use it' part is important, so please consider
ways to make the default setting of a 'tree' not waste memory, and to
let the tree automatically expand without limits. I realize it's not
too easy with hash tables, but it should be possible.

Hein Zelle

>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<
 Hein Zelle                     hein@xxxxxxxxxx
	                        http://www.icce.rug.nl/~hein
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/