Redis has relied on a combination of a skiplist and a standard hash table to power sorted sets for well over a decade. Salvatore Sanfilippo has proposed replacing this architecture for large sorted sets with a score-ordered packed B+ tree paired with a compact member index.
The trade-offs here are remarkable. Early benchmarks show memory consumption drops by 45 to 60 percent across common production workloads, while many operations run up to 70 percent faster. By packing nodes together rather than chasing pointers across loose skiplist nodes, cache locality improves dramatically on modern CPU hardware.
The patch touches the entire command pipeline, from persistence load to defragmentation, while preserving wire compatibility and the underlying disk format. Range scans and insertions benefit immediately from dense node packing, even though cursor-based iteration requires careful handling.
Cache locality wins every time when pointer overhead begins to dominate memory bandwidth.








