public override int GetHashCode()
        {
#if false
            var hash = TezHash.intHash(q);
            hash = TezHash.intHash(hash + r);
            return(hash);
#else
            var hq = TezHash.intHash(q);
            var hr = TezHash.intHash(r);
            return(hq ^ (hr + 0x61C88647 + (hq << 6) + (hq >> 2)));
#endif
        }
Example #2
0
        /// <summary>
        /// 请包装类记录一下Hash值
        /// </summary>
        public override int GetHashCode()
        {
#if false
            ///经过测试
            ///此算法约80W数据时冲突362个
            var hash = TezHash.intHash(q);
            hash = TezHash.intHash(hash + r);
            return(hash);
#else
            ///经过测试
            ///此算法约80W数据时冲突76个值
            var hq = TezHash.intHash(q);
            var hr = TezHash.intHash(r);
            return(hq ^ (hr + 0x61C88647 + (hq << 6) + (hq >> 2)));
#endif
        }