t_set.c comment update for srandmemberWithCountCommand (#7922)
Reference the correct "case", case 4, in the comment explaining the need for case 3, when the number of request items is too close to the cardinality of the set. Case 4 is indeed the "natural approach" referenced earlier in that sentence.
This commit is contained in:
parent
786d6d55cf
commit
f6010e106b
@ -694,7 +694,7 @@ void srandmemberWithCountCommand(client *c) {
|
|||||||
*
|
*
|
||||||
* This is done because if the number of requested elements is just
|
* This is done because if the number of requested elements is just
|
||||||
* a bit less than the number of elements in the set, the natural approach
|
* a bit less than the number of elements in the set, the natural approach
|
||||||
* used into CASE 3 is highly inefficient. */
|
* used into CASE 4 is highly inefficient. */
|
||||||
if (count*SRANDMEMBER_SUB_STRATEGY_MUL > size) {
|
if (count*SRANDMEMBER_SUB_STRATEGY_MUL > size) {
|
||||||
setTypeIterator *si;
|
setTypeIterator *si;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user