优化打包速度,提示编辑器启动速度,md5替换xxhash,速度提升一倍以上
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Standart.Hash.xxHash
|
||||
{
|
||||
public static partial class xxHash32
|
||||
{
|
||||
private static readonly uint XXH_PRIME32_1 = 2654435761U;
|
||||
private static readonly uint XXH_PRIME32_2 = 2246822519U;
|
||||
private static readonly uint XXH_PRIME32_3 = 3266489917U;
|
||||
private static readonly uint XXH_PRIME32_4 = 668265263U;
|
||||
private static readonly uint XXH_PRIME32_5 = 374761393U;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static uint XXH_rotl32(uint x, int r)
|
||||
{
|
||||
return (x << r) | (x >> (32 - r));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user