Changeset 26d8df3 in mainline for kernel/generic/include/adt/hash.h


Ignore:
Timestamp:
2012-08-03T16:27:12Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6eaed07
Parents:
5e5cef3
Message:

adt: Changed the 64-bit hash mixer to produce higher quality high order bits at the expense of lowering low order bits quality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/adt/hash.h

    r5e5cef3 r26d8df3  
    6666        hash = hash * 0x27d4eb2d;
    6767        hash = hash ^ (hash >> 15);     
    68         return hash;
     68        /*
     69         * Lower order bits are mixed more thoroughly. Swap them with
     70         * the higher order bits and make the resulting higher order bits
     71         * more usable.
     72         */
     73        return (hash << 32) | (hash >> 32);
    6974}
    7075
Note: See TracChangeset for help on using the changeset viewer.