Re: [AD] usprintf()

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


Vincent Penquerc'h <lyrian@xxxxxxxxxx> writes:
> Actually, if something had to be done with regard to translations, what do 
> you all think about making something with hash tables, to speed up 
> fetching translated strings ? Even if strings are not used *that* often 
> per frame, games with a huge text database would suffer from the current
> way it's done (in a config file).

I'd tend to think that if it was going to use a hash table, it would be 
better to do that hashing in the config functions rather than specifically 
in the translation system. The more you make one part of a system leverage 
other similar parts, the more different places will be able to benefit from 
any improvements, so it makes sense to always try to improve things at the 
lowest possible level.

But I also think that you should never do complex optimisations until you've 
proven that there is a need for them, and I've yet to see or hear of the 
config text lookups taking too long in a real world program...


-- 
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."



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