Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
e3234116
Commit
e3234116
authored
Mar 28, 2014
by
antirez
Browse files
HyperLogLog: redefine constants using "P".
parent
e73839e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hyperloglog.c
View file @
e3234116
...
...
@@ -51,8 +51,9 @@
* analysis of a near-optimal cardinality estimation algorithm.
*/
#define REDIS_HLL_REGISTERS 16384
#define REDIS_HLL_BITS 6
#define REDIS_HLL_P 14
/* The greater is P, the smaller the error. */
#define REDIS_HLL_REGISTERS (1<<REDIS_HLL_P)
/* With P=14, 16384 registers. */
#define REDIS_HLL_BITS 6
/* Enough to count up to 63 leading zeroes. */
#define REDIS_HLL_REGISTER_MAX ((1<<REDIS_HLL_BITS)-1)
#define REDIS_HLL_SIZE ((REDIS_HLL_REGISTERS*REDIS_HLL_BITS+7)/8)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment