diff options
author | antirez <antirez@gmail.com> | 2015-02-10 22:59:12 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-02-11 10:52:28 +0100 |
commit | 9feee428f25a5681a06cd13ed1c4cc644759e719 (patch) | |
tree | ac3cc1ce859e91f7dffad04be400303065519166 /src/intset.h | |
parent | 55003f7a118beb20ed1bc65926e29e207c3b721a (diff) | |
download | redis-9feee428f25a5681a06cd13ed1c4cc644759e719.tar.gz |
SPOP: reimplemented for speed and better distribution.
The old version of SPOP with "count" argument used an API call of dict.c
which was actually designed for a different goal, and was not capable of
good distribution. We follow a different three-cases approach optimized
for different ratiion between sets and requested number of elements.
The implementation is simpler and allowed the removal of a large amount
of code.
Diffstat (limited to 'src/intset.h')
-rw-r--r-- | src/intset.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/intset.h b/src/intset.h index 7550df303..30a854f89 100644 --- a/src/intset.h +++ b/src/intset.h @@ -43,7 +43,6 @@ intset *intsetAdd(intset *is, int64_t value, uint8_t *success); intset *intsetRemove(intset *is, int64_t value, int *success); uint8_t intsetFind(intset *is, int64_t value); int64_t intsetRandom(intset *is); -int intsetRandomMembers(intset *is, int64_t* value, int count); uint8_t intsetGet(intset *is, uint32_t pos, int64_t *value); uint32_t intsetLen(intset *is); size_t intsetBlobLen(intset *is); |