> This was suggested by Carlos Hasan mailto:[EMAIL PROTECTED] but as I'm not
> overly familiar with the hashing code I'm putting it forward rather than
> committing it :)

>       */
>      hash = 0;
>      for (p = key, i = klen; i; i--, p++)
> -       hash = hash * 33 + *p;
> +        hash += (hash << 5) + *p;
> +
>      /* scan linked list */
>      for (hep = &ht->array[hash & ht->max], he = *hep;
>          he;

Ummmm,  those aren't equal.  :-)  I seem to remember that Tony had a very
good reason for choosing (hash * 33).  We seem to have had this
conversation in the past on new-httpd.  I would need to search the
archives, which is not easy right now.  I believe Tony is not monitoring
this list right now, but I'll try to get an answer from him tomorrow.

Ryan

_______________________________________________________________________________
Ryan Bloom                              [EMAIL PROTECTED]
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------

Reply via email to