Commit 54f0156e authored by antirez's avatar antirez
Browse files

Set HLL_SPARSE_MAX to 3000.

After running a few benchmarks, 3000 looks like a reasonable value to
keep HLLs with a few thousand elements small while the CPU cost is
still not huge.

This covers all the cases where the dense representation would use N
orders of magnitude more space, like in the case of many HLLs with
carinality of a few tens or hundreds.

It is not impossible that in the future this gets user configurable,
however it is easy to pick an unreasoable value just looking at savings
in the space dimension without checking what happens in the time
dimension.
parent 848d0461
......@@ -202,7 +202,7 @@ struct hllhdr {
#define HLL_SPARSE 1 /* Sparse encoding */
#define HLL_MAX_ENCODING 1
#define HLL_SPARSE_MAX 12000
#define HLL_SPARSE_MAX 3000
static char *invalid_hll_err = "Corrupted HLL object detected";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment