fix isal crc64 bug (#1052)
* use isal for crc check * add NULL check in crc isal * update isal crc code to latest pull request
This commit is contained in:
4
deps/oblib/src/lib/checksum/ob_crc64.cpp
vendored
4
deps/oblib/src/lib/checksum/ob_crc64.cpp
vendored
@ -422,8 +422,7 @@ for RHEL4 support (GCC 3 doesn't support this instruction) */
|
||||
#define crc32_sse42_byte crc = __crc32cb(crc, (uint8_t)*buf); len--, buf++
|
||||
#endif /* defined(__GNUC__) && defined(__x86_64__) */
|
||||
|
||||
uint64_t crc64_sse42(uint64_t uCRC64,
|
||||
const char *buf, int64_t len)
|
||||
uint64_t crc64_sse42(uint64_t uCRC64, const char* buf, int64_t len)
|
||||
{
|
||||
uint64_t crc = uCRC64;
|
||||
|
||||
@ -1142,6 +1141,7 @@ uint64_t crc64_sse42_dispatch(uint64_t crc, const char *buf, int64_t len)
|
||||
_OB_LOG(WARN, "Use manual crc32 table lookup for crc64 calculate");
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(__aarch64__)
|
||||
#if 1
|
||||
ob_crc64_sse42_func = &crc64_sse42;
|
||||
|
||||
@ -83,7 +83,7 @@ TEST(TestCrc64, test_speed)
|
||||
crc64_sse42(0, tmp_str, i);
|
||||
}
|
||||
end = get_current_time_us();
|
||||
cout << " ob_crc64(sse42), execut_count = "<< COUNT << ", cost_us = " << end - start << " len = " << i << endl;
|
||||
cout << " ob_crc64(sse42), execut_count = "<< COUNT << ", cost_us = " << end - start << " len = " << i << endl;
|
||||
|
||||
start = get_current_time_us();
|
||||
for (int64_t j = 0; j < COUNT; ++j) {
|
||||
|
||||
Reference in New Issue
Block a user