---
title: "Data structures (hard)"
description: "Data structure design: trees, hashes, probabilistic structures"
url: "https://swe.quest/tags/data-structures?difficulty=hard"
---

# Data structures (hard)

Topic in Architecture & design: Data structure design: trees, hashes, probabilistic structures

By difficulty: [Easy](https://swe.quest/tags/data-structures.md?difficulty=easy) · [Medium](https://swe.quest/tags/data-structures.md?difficulty=medium) · [Hard](https://swe.quest/tags/data-structures.md?difficulty=hard)

Posts 1–14 of 14, page 1 of 1, newest first.

## 2026-08-24

- [WAL + S3: Lakebase storage for the era of agents](https://swe.quest/articles/wal-s3-lakebase-storage-for-the-era-of-agents-3f04922da0e40ff3.md): Neon · 2026-08-24 · Hard · 15 min read · PostgreSQL, Storage engines, Storage systems, Data structures, Replication
  Lakebase Postgres (Neon's architecture) treats the Postgres write-ahead log as the source of truth and data pages as a derived cache, splitting the system into stateless compute running unmodified Postgres and a storage layer of Paxos-replicated safekeepers, pageservers, and S3.

## 2026-08-11

- [How we improved APM Java startup by encoding a prefix trie as a JVM constant](https://swe.quest/articles/how-we-improved-apm-java-startup-by-encoding-a-prefix-trie-as-a-jvm-constant-ef8ab81cb4120a77.md): Datadog Engineering · 2026-08-11 · Hard · 11 min read · Java & JVM, Data structures, Performance engineering, Observability, Runtimes & VMs
  Datadog's Java APM agent filters uninteresting classes by name during JVM startup using ClassNameTrie, a prefix trie encoded entirely in a single string constant and loaded with one ldc instruction.

## 2026-07-31

- [Don’t stop early: Case-folding source code at memory speed](https://swe.quest/articles/don-t-stop-early-case-folding-source-code-at-memory-speed-d9a0d3aa3df1f3f4.md): GitHub Engineering · 2026-07-31 · Hard · 18 min read · Performance engineering, Rust, Search, Algorithms, Data structures
  GitHub's Blackbird code search case-folds every byte of 480TB of source, and the fastest ASCII path came from removing the early exit at the first non-ASCII byte.

## 2026-06-02

- [iddqd, or the hardest kind of unsafe Rust](https://swe.quest/articles/iddqd-or-the-hardest-kind-of-unsafe-rust-50456dacfa60840a.md): Oxide · 2026-06-02 · Hard · 23 min read · Rust, Memory safety, Data structures
  iddqd is a Rust map library, used in Oxide's Omicron control plane, where keys are borrowed from the values themselves.

## 2026-04-24

- [Accelerate RL rollouts by up to 50% with distribution-aware speculative decoding](https://swe.quest/articles/accelerate-rl-rollouts-by-up-to-50-with-distribution-aware-speculative-decoding-1fa2a300c01f2135.md): Together AI · 2026-04-24 · Hard · 5 min read · Inference & serving, Model training, LLMs, Performance engineering, Data structures
  Distribution-aware speculative decoding (DAS) speeds up the rollout phase of LLM RL post-training, which can consume ~70% of training time due to long-tail straggler generations, while keeping outputs identical to standard decoding.

## 2026-03-24

- [Building high-performance full-text search for object storage](https://swe.quest/articles/building-high-performance-full-text-search-for-object-storage-7061dd61b5d19a17.md): ClickHouse · 2026-03-24 · Hard · 33 min read · Search, Storage engines, Data structures, Analytics & OLAP, Performance engineering
  ClickHouse redesigned its full-text index for object storage, where per-request latency rather than bandwidth is the bottleneck.

## 2025-12-31

- [BitFields API: Type-Safe Bit Packing for Lock-Free Data Structures](https://swe.quest/articles/bitfields-api-type-safe-bit-packing-for-lock-free-data-structures-0725d8986cbdf5c3.md): RocksDB Blog · 2025-12-31 · Hard · 9 min read · Concurrency, C & C++, Data structures, Caching, Performance engineering
  RocksDB's BitFields API is a template-based C++ abstraction that declares multiple logical fields packed into one atomic integer, replacing hand-written shifts and masks with typed Get/Set accessors and composable "transforms".

## 2025-03-21

- [Dynamic Tree Improvements](https://swe.quest/articles/dynamic-tree-improvements-db8f5926a23bef4f.md): Box2D · 2025-03-21 · Hard · 3 min read · Data structures, Algorithms, Games, C & C++
  Box2D's dynamic tree inserts a new proxy using a greedy, single-descent heuristic that approximates minimizing the surface area heuristic (SAH) instead of doing an exhaustive search, since incremental insertion is inherently greedy anyway.

## 2024-02-20

- [Aligning Velox and Apache Arrow: Towards composable data management](https://swe.quest/articles/aligning-velox-and-apache-arrow-towards-composable-data-management-afb27bd747bab328.md): Meta Engineering · 2024-02-20 · Hard · 8 min read · Query engines, Analytics & OLAP, Data structures, Open source, C & C++
  Apache Arrow 15 adds three columnar layouts derived from Meta's Velox Vectors: StringView, ListView and Run-End-Encoding (REE).

## 2023-05-19

- [Persistent Structures: Key to 2000x Speedup in Neon’s WAL Indexing](https://swe.quest/articles/persistent-structures-key-to-2000x-speedup-in-neon-s-wal-indexing-ca3203d56783f4cb.md): Neon · 2023-05-19 · Hard · 10 min read · Data structures, Storage engines, PostgreSQL, Rust, Performance engineering
  Neon's pageserver must answer GetPage(key, LSN) by finding, for a point in key–LSN space, the first image or delta layer rectangle directly below it, across tens of millions of layers.

## 2023-05-16

- [Hash tables in ClickHouse and C++ Zero-cost Abstractions](https://swe.quest/articles/hash-tables-in-clickhouse-and-c-zero-cost-abstractions-bd1cf29e2582e0a8.md): ClickHouse · 2023-05-16 · Hard · 19 min read · Data structures, C & C++, Performance engineering, Query engines, Analytics & OLAP
  ClickHouse implements GROUP BY and JOIN with a family of open-addressing hash tables generated from a common zero-cost C++ framework, specialized by key type and workload.

## 2022-04-14

- [Code Ranges: A Deeper Look at Ruby Strings](https://swe.quest/articles/code-ranges-a-deeper-look-at-ruby-strings-b87e06d5cb44fa84.md): Shopify Engineering · 2022-04-14 · Hard · 14 min read · Ruby, Runtimes & VMs, Data structures, Performance engineering
  Ruby strings are mutable and encoding-aware across 100+ encodings, so runtimes cache a per-string "code range" (UNKNOWN, 7BIT, VALID, BROKEN) to avoid repeated O(n) validity scans.

## 2021-10-26

- [Kangaroo: A new flash cache optimized for tiny objects](https://swe.quest/articles/kangaroo-a-new-flash-cache-optimized-for-tiny-objects-925482fcf04e3dc4.md): Meta Engineering · 2021-10-26 · Hard · 5 min read · Caching, Storage systems, Data structures, Hardware
  Kangaroo is a flash cache for tiny objects (~100 bytes) that pairs a small log-structured cache (KLog, ~5% of flash) with a large set-associative cache (KSet).

## 2021-07-09

- [Ribbon filter: Practically smaller than Bloom and Xor](https://swe.quest/articles/ribbon-filter-practically-smaller-than-bloom-and-xor-22be170304982d25.md): Meta Engineering · 2021-07-09 · Hard · 3 min read · Data structures, Algorithms, Storage engines
  Ribbon filters are a static (immutable) alternative to Bloom filters that save roughly a third of memory, with space overhead as low as 1 percent above the information-theoretic bound versus Bloom's roughly 50 percent, while keeping O(1) queries.

Same list as RSS: [https://swe.quest/feed.xml?difficulty=hard&tag=data-structures](https://swe.quest/feed.xml?difficulty=hard&tag=data-structures). Lists take `?page=`, `?per=12|24|48|96` and, on the home page, `?tag=` (up to 3), `?source=`, `?difficulty=easy|medium|hard` and `?search=`.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
