mirror of
https://github.com/fluencelabs/redis
synced 2025-06-17 19:21:21 +00:00
Reference zset score in zskiplistNode from dict entries
This avoids the extra allocation of sizeof(double) for storing the score of a zset entry in the hash table. Saves sizeof(double) + malloc overhead = approx. 16 bytes per zset entry.
This commit is contained in:
@ -338,7 +338,7 @@ dictType zsetDictType = {
|
||||
NULL, /* val dup */
|
||||
dictEncObjKeyCompare, /* key compare */
|
||||
dictRedisObjectDestructor, /* key destructor */
|
||||
dictVanillaFree /* val destructor of malloc(sizeof(double)) */
|
||||
NULL /* val destructor */
|
||||
};
|
||||
|
||||
/* Db->dict, keys are sds strings, vals are Redis objects. */
|
||||
|
Reference in New Issue
Block a user