summaryrefslogtreecommitdiff
path: root/src/dict.h
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-02-10 22:59:12 +0100
committerantirez <antirez@gmail.com>2015-02-11 10:52:28 +0100
commit9feee428f25a5681a06cd13ed1c4cc644759e719 (patch)
treeac3cc1ce859e91f7dffad04be400303065519166 /src/dict.h
parent55003f7a118beb20ed1bc65926e29e207c3b721a (diff)
downloadredis-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/dict.h')
-rw-r--r--src/dict.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/dict.h b/src/dict.h
index 5959a57b9..014d18212 100644
--- a/src/dict.h
+++ b/src/dict.h
@@ -165,7 +165,6 @@ dictEntry *dictNext(dictIterator *iter);
void dictReleaseIterator(dictIterator *iter);
dictEntry *dictGetRandomKey(dict *d);
unsigned int dictGetSomeKeys(dict *d, dictEntry **des, unsigned int count);
-unsigned int dictGetRandomKeys(dict *d, dictEntry **des, unsigned int count);
void dictPrintStats(dict *d);
unsigned int dictGenHashFunction(const void *key, int len);
unsigned int dictGenCaseHashFunction(const unsigned char *buf, int len);