From Skiplists to B+ Trees: Making Valkey Sorted Sets More Memory Efficient
Summary
Valkey’s technical post explains replacing a skiplist with a high-fanout B+ tree (fbtree) for sorted sets, achieving 36–43% per-member memory overhead reductions and up to 109 MB saved on a 5-million-member test. It covers memory layout, SIMD optimizations, and bench results, noting commands remain functionally the same aside from OBJECT ENCODING returning btree for large sets. The article is a valuable reference for data-structure optimization, in-memory indexing, and performance benchmarking in database-like systems.