From 9feee428f25a5681a06cd13ed1c4cc644759e719 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 10 Feb 2015 22:59:12 +0100 Subject: 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. --- src/dict.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/dict.h') 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); -- cgit v1.2.1