NOTE
2.16 ziplist
ziplist and why it saves memory.
This is a historical learning note and may contain outdated or incomplete understanding.
1. What Is ziplist
- A Redis internal data structure used to implement list and zset
- A contiguous block of memory
2. Why ziplist Is Needed
- Dynamic array: consists of a length and an element list. Each element occupies the same amount of space and has the same type
- ziplist: also consists of a length and an element list. The difference is:
- Each element can occupy a different amount of space, so memory can be saved


Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub