[Freeciv-Dev] Re: Better string hashing function
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On 29 Mar 2000, Falk Hueffner wrote:
> Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxxxxxxxxx> writes:
>
> > unsigned int hash_fval_string(const void *vkey, unsigned int num_buckets)
> > {
> > register const char *key = (const char *)vkey;
>
> Please leave off the "register" keyword, since it doesn't improev
> performance on any decent compiler and might confuse people who don't
> know it.
That's fine by me. I only hope that gcc is one of those "decent"
compilers... :)
Anyway, the "const" keyword should be enough to make the compiler put it
into a register.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
|
|