提交 b5598b63 编写于 作者: H Haojun Liao

[td-225] opt performance for random number generation.

上级 4c97427e
...@@ -38,7 +38,7 @@ static FORCE_INLINE int32_t getSkipListNodeRandomHeight(SSkipList *pSkipList) { ...@@ -38,7 +38,7 @@ static FORCE_INLINE int32_t getSkipListNodeRandomHeight(SSkipList *pSkipList) {
const uint32_t factor = 4; const uint32_t factor = 4;
int32_t n = 1; int32_t n = 1;
while ((taosRand() % factor) == 0 && n <= pSkipList->maxLevel) { while ((rand() % factor) == 0 && n <= pSkipList->maxLevel) {
n++; n++;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册