1.精简键名和键值
2.内部编码优化
查看内部编码方式:
127.0.0.1:6379> set foo bar
OK
127.0.0.1:6379> object encoding foo
"embstr"
typedef struct redisObject
{
unsigned type:4;
unsigned notused:2;
unsigned encoding:4;
unsigned lru:22;
int refcount;
void *ptr;
};
simple dynamic string(sds)