leerho commented on issue #717: URL: https://github.com/apache/datasketches-java/issues/717#issuecomment-3775913023
The whole idea of the PairTable is to hold low cardinality rowCol pairs (sparse mode) before the sketch transistions into one of the "dense" modes. As the cardinality goes into higher modes (hybrid, pinned, and sliding), the PairTable is used for "novel" pairs that lie below or above the 8 bit wide window, which are rare. Nonetheless, the PairTable will never reach a size of 2^26. So checking the PT 2 <= LgSize <= 26 is OK but loose. (I could figure out what the actual max size is, but it isn't worth the trouble right now.) Likewise, the number of valid bits should never be less than 10 = 6+4, with a max of 32. Checking the range to be [(lg_size +1)..=32 is OK but loose. The Java PairTable "final int shift = table.validBits - lgSizeInts; " is a trick to improve probe efficiency of the hash table. The assert that it is > 0 is OK but loose. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
