>>>>> "M" == Mauricio =?iso-8859-1?Q?Fern=E1ndez?= <Mauricio> writes:

>> 
>> Or famous tricky code:
>> 
>> if (len > 0) {
>> switch (len & 31) {
>> do {
>> case 0: key = key*65599 + *p++;
>> case 31: key = key*65599 + *p++;
>> case 30: key = key*65599 + *p++;
>> case 29: key = key*65599 + *p++;
>> case 28: key = key*65599 + *p++;
>> /* snip */
>> case 1: key = key*65599 + *p++;
>> } while ((len -= 32) > 0);
>> }
>> }

M> Why isn't that in use right now?

 Well, if I'm right this is the OZ's sdbm hash and it was unrolled (in gawk)
 with 

           if (len > 0) {
                   register size_t loop = (len + 8 - 1) >> 3;

                   switch (len & (8 - 1)) {
                   case 0:
                           do { /* All fall throughs */
                                   HASHC;
                   case 7:              HASHC;
                   case 6:              HASHC;
                   case 5:              HASHC;
                   case 4:              HASHC;
                   case 3:              HASHC;
                   case 2:              HASHC;
                   case 1:              HASHC;
                           } while (--loop);
                   }


Guy Decoux