ascv / HyperLogLog

Fast HyperLogLog for Python.
MIT License
99 stars 19 forks source link

A typo was found in the comments of `src/hll.c` #42

Closed ZWindL closed 3 years ago

ZWindL commented 3 years ago

After reading the leading comments in this file, I think the illustration in line 48 was wrong, the byte after b1 should be b2 rather than b3.

/* ========================== Dense representation ========================= */
/*
 * Since register values will never exceed 64 we store them using only 6 bits.
 * This encoding is diagrammed below:
 *
 *          b0        b1        b3        b4
 *          /         /         /         /
 *     +-------------------+---------+---------+
 *     |0000 0011|1111 0011|0110 1110|1111 1011|
 *     +-------------------+---------+---------+
 *      |_____||_____| |_____||_____| |_____|
 *         |      |       |      |       |
 *       offset   m1      m2     m3     m4
 *
 *      b = bytes, m = registers
 *

And I fixed this little issue in this PR: #41

Actually, that's barely an issue :P Thanks for the great work! I'm still learning the HLL algorithm.