mirror of
http://github.com/valkey-io/valkey
synced 2024-11-23 20:00:00 +00:00
HyperLogLog: redefine constants using "P".
This commit is contained in:
parent
e73839e7d5
commit
e3234116ad
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user