Skip to content

Commit 920fefc

Browse files
docs(optimizer): update #524 status — cms-heap wrapper landed, not wired yet (#646)
sketch-bench#95/PR#104 added a real CountMinSketchWithHeap wrapper, but its params (rows/cols only, no heapsize/top_k/count_events) don't map cleanly onto ASAPQuery's grid yet. Terse dated status list of what's left in 3c. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent c8e5ea3 commit 920fefc

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

‎.design_docs/optimizer-v1-implementation-plan.md‎

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,28 @@ Allow a config with labels ⊇ query labels to serve that AQE. This is what enab
269269

270270
- ✅ Plug real `AtomicCosts` values into cost model — done for CMS/HLL/KLL, see 2f above and
271271
"Running with real sketch-bench costs" below.
272-
- ❌ Add `CountMinSketchWithHeap` wrapper in sketch-bench, so it stops always costing at the flat
273-
stub. Its memory is meant to be an analytic bound (`heap_size · avg_key_size`), not a
274-
sketch-bench lookup at all, per #524 — that formula still needs implementing in
275-
`atomic_costs.rs`/`cost_model.rs`.
272+
- ✅ `CountMinSketchWithHeap` wrapper in sketch-bench (`cms-heap` family — sketch-bench PR #104,
273+
closed sketch-bench#95) — but not wired to ASAPQuery's cost lookup yet, see status below.
276274
- ~~Add cardinality to sweep grids in `sketch-bench`~~ — decided unnecessary: CPU/mem costs for
277275
CMS/HLL/KLL are functions of structural params (depth×width, lg_k, K), not cardinality: only
278-
`CountMinSketchWithHeap` is cardinality-dependent, and that's the analytic-bound case above, not
276+
`CountMinSketchWithHeap` is cardinality-dependent, and that's the analytic-bound case below, not
279277
a sketch-bench sweep axis.
280278

279+
**Status as of 2026-08-28:**
280+
1. `export_atomic_costs.sh` doesn't sweep `cms-heap` yet.
281+
2. Mapping gap: sketch-bench's `CmsHeapParams` is `{rows, cols}` only — `top_k` is a compile-time
282+
constant, Frequency-vs-TopK is two registry variants, not a param. ASAPQuery's grid sweeps
283+
`{depth, width, heapsize, count_events}` — `heapsize` has no home in sketch-bench's data at
284+
all, confirming it must stay analytic. Unresolved: which of the 4 sketch-bench variants
285+
(FastPath/RegularPath × Frequency/TopK) matches what ASAPQuery's `CountMinSketchWithHeap`
286+
accumulator actually deploys, and what `count_events` maps to.
287+
3. Once (2) is resolved: extend `sketch_bench_key()` in `atomic_costs.rs` to translate
288+
`CountMinSketchWithHeap` → the right variant + `{rows,cols}`, for CPU costs only.
289+
4. Analytic memory bound (`heap_size · avg_key_size`) still not implemented — needed regardless
290+
of (1)–(3), memory was always meant to be analytic here, never a lookup.
291+
5. sketch-bench#14 (HLL register-width memory bug) — still open, still un-fixed.
292+
6. asap_sketchlib#69 (`subtract` unimplemented) — still open, `subtract_cpu_secs` absent by design.
293+
281294
#### 3d — Accuracy constraint
282295

283296
Implement `Error(a,g,θ_a) ≤ ε_a` in `is_feasible()`:

0 commit comments

Comments
 (0)