Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2000:
[Freeciv-Dev] Re: Better string hashing function
Home

[Freeciv-Dev] Re: Better string hashing function

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Better string hashing function
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 30 Mar 2000 19:13:41 +0100 (WET DST)

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




[Prev in Thread] Current Thread [Next in Thread]