未验证 提交 204a76ba 编写于 作者: X XiTang 提交者: GitHub

fix isal crc64 bug (#1052)

* use isal for crc check

* add NULL check in crc isal

* update isal crc code to latest pull request
上级 6301693f
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册