new compute kernel design, less mem read delay
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
#if SN_IS_ARCH(SN_ARCH_X86_64)
|
||||
|
||||
#include "sn_intrinsic.h"
|
||||
#include "StgSharpNative.h"
|
||||
|
||||
INTERNAL int SN_DECL city_hash_simplify_sse(byte const *str, int const length)
|
||||
@@ -17,7 +16,7 @@ INTERNAL int SN_DECL city_hash_simplify_sse(byte const *str, int const length)
|
||||
}
|
||||
} else if (size < 16) {
|
||||
for (; ptr < end; ptr += 4) {
|
||||
hash = _mm_crc32_u32(hash, SN_CONST_PTR_CAST(uint32_t, ptr)[0]);
|
||||
hash = _mm_crc32_u32(hash, ((uint32_t const *)ptr)[0]);
|
||||
}
|
||||
for (; ptr < end; ptr++) {
|
||||
hash = _mm_crc32_u16(hash, *ptr);
|
||||
@@ -34,7 +33,7 @@ INTERNAL int SN_DECL city_hash_simplify_sse(byte const *str, int const length)
|
||||
hash = _mm_crc32_u8(hash, hash64);
|
||||
hash = _mm_crc32_u8(hash, hash64 >> 32);
|
||||
for (; ptr < last_32; ptr += 4) {
|
||||
hash = _mm_crc32_u32(hash, SN_CONST_PTR_CAST(uint32_t, ptr)[0]);
|
||||
hash = _mm_crc32_u32(hash, ((uint32_t const *)ptr)[0]);
|
||||
}
|
||||
for (; ptr < end; ptr += 2) {
|
||||
hash = _mm_crc32_u8(hash, *ptr);
|
||||
|
||||
Reference in New Issue
Block a user