Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xindoo
redis
提交
5317a582
R
redis
项目概览
xindoo
/
redis
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redis
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5317a582
编写于
3月 29, 2014
作者:
A
antirez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove a few useless operations from hllCount() fast path.
上级
3ed947fb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
4 deletion
+4
-4
src/hyperloglog.c
src/hyperloglog.c
+4
-4
未找到文件。
src/hyperloglog.c
浏览文件 @
5317a582
...
...
@@ -294,7 +294,7 @@ uint64_t hllCount(uint8_t *registers) {
* Redis default is to use 16384 registers 6 bits each. The code works
* with other values by modifying the defines, but for our target value
* we take a faster path with unrolled loops. */
if
(
REDIS_HLL_REGISTERS
==
16384
&&
REDIS_HLL_BITS
==
6
&&
1
)
{
if
(
REDIS_HLL_REGISTERS
==
16384
&&
REDIS_HLL_BITS
==
6
)
{
uint8_t
*
r
=
registers
;
unsigned
long
r0
,
r1
,
r2
,
r3
,
r4
,
r5
,
r6
,
r7
,
r8
,
r9
,
r10
,
r11
,
r12
,
r13
,
r14
,
r15
;
...
...
@@ -304,15 +304,15 @@ uint64_t hllCount(uint8_t *registers) {
r1
=
(
r
[
0
]
<<
6
|
r
[
1
]
>>
2
)
&
63
;
if
(
r1
==
0
)
ez
++
;
r2
=
(
r
[
1
]
<<
4
|
r
[
2
]
>>
4
)
&
63
;
if
(
r2
==
0
)
ez
++
;
r3
=
((
r
[
2
]
<<
2
)
|
(
r
[
3
]
>>
6
))
&
63
;
if
(
r3
==
0
)
ez
++
;
r4
=
(
r
[
3
]
|
r
[
4
]
>>
8
)
&
63
;
if
(
r4
==
0
)
ez
++
;
r4
=
r
[
3
]
&
63
;
if
(
r4
==
0
)
ez
++
;
r5
=
(
r
[
3
]
<<
6
|
r
[
4
]
>>
2
)
&
63
;
if
(
r5
==
0
)
ez
++
;
r6
=
(
r
[
4
]
<<
4
|
r
[
5
]
>>
4
)
&
63
;
if
(
r6
==
0
)
ez
++
;
r7
=
(
r
[
5
]
<<
2
|
r
[
6
]
>>
6
)
&
63
;
if
(
r7
==
0
)
ez
++
;
r8
=
(
r
[
6
]
|
r
[
7
]
>>
8
)
&
63
;
if
(
r8
==
0
)
ez
++
;
r8
=
r
[
6
]
&
63
;
if
(
r8
==
0
)
ez
++
;
r9
=
(
r
[
6
]
<<
6
|
r
[
7
]
>>
2
)
&
63
;
if
(
r9
==
0
)
ez
++
;
r10
=
(
r
[
7
]
<<
4
|
r
[
8
]
>>
4
)
&
63
;
if
(
r10
==
0
)
ez
++
;
r11
=
(
r
[
8
]
<<
2
|
r
[
9
]
>>
6
)
&
63
;
if
(
r11
==
0
)
ez
++
;
r12
=
(
r
[
9
]
|
r
[
10
]
>>
8
)
&
63
;
if
(
r12
==
0
)
ez
++
;
r12
=
r
[
9
]
&
63
;
if
(
r12
==
0
)
ez
++
;
r13
=
(
r
[
9
]
<<
6
|
r
[
10
]
>>
2
)
&
63
;
if
(
r13
==
0
)
ez
++
;
r14
=
(
r
[
10
]
<<
4
|
r
[
11
]
>>
4
)
&
63
;
if
(
r14
==
0
)
ez
++
;
r15
=
(
r
[
11
]
<<
2
|
r
[
12
]
>>
6
)
&
63
;
if
(
r15
==
0
)
ez
++
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录