优化打包速度,提示编辑器启动速度,md5替换xxhash,速度提升一倍以上
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Standart.Hash.xxHash
|
||||
{
|
||||
public static partial class xxHash128
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static ulong XXH64_avalanche(ulong hash)
|
||||
{
|
||||
hash ^= hash >> 33;
|
||||
hash *= XXH_PRIME64_2;
|
||||
hash ^= hash >> 29;
|
||||
hash *= XXH_PRIME64_3;
|
||||
hash ^= hash >> 32;
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user