From 1bfb09185cff8b6eba4a106d1fc0190720f24228 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 8 Sep 2022 14:01:27 +0800 Subject: [PATCH] refactor: opt perf. --- source/common/src/tdataformat.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/common/src/tdataformat.c b/source/common/src/tdataformat.c index b40f449a05..13f4d6018b 100644 --- a/source/common/src/tdataformat.c +++ b/source/common/src/tdataformat.c @@ -102,7 +102,9 @@ int32_t tGetValue(uint8_t *p, SValue *pValue, int8_t type) { n += tGetI32(p, &pValue->i32); break; case TSDB_DATA_TYPE_BIGINT: - n += tGetI64(p, &pValue->i64); + pValue->i64 = *(int64_t*)p; + n += sizeof(int64_t); +// n += tGetI64(p, &pValue->i64); break; case TSDB_DATA_TYPE_FLOAT: n += tGetFloat(p, &pValue->f); @@ -123,7 +125,9 @@ int32_t tGetValue(uint8_t *p, SValue *pValue, int8_t type) { n += tGetU32(p, &pValue->u32); break; case TSDB_DATA_TYPE_UBIGINT: - n += tGetU64(p, &pValue->u64); + pValue->u64 = *(uint64_t*)p; + n += sizeof(uint64_t); +// n += tGetU64(p, &pValue->u64); break; default: ASSERT(0); -- GitLab