Skip to content

Optimizer: param-aware atomic costs from sketch-bench #524

Closed as not planned

Description

@milindsrivastava1997

Part of #523 (Track 1: non-empirical gap 1 + empirical gap 1). Depends on sketch-bench#30 for the derived cost table this loads.

  • Match candidate_gen.rs's param grid (CMS_DEPTHS × CMS_WIDTHS etc.) exactly to sketch-bench's sweep grid — lookup by exact key, no interpolation.
  • cost_model.rs's ingest_cost/query_cost take atomic costs (mem/insert_cpu/merge_cpu/subtract_cpu/query_cpu) as a function of (sketch_type, params) instead of flat AtomicCosts constants.
  • Atomic-cost table loaded at runtime from a file path (CLI/config arg), not compiled in — regenerating sketch-bench data shouldn't require a rebuild. Loader deserializes sketch-bench's already-derived export directly (sketch-bench#30) — no raw-Record math in ASAPQuery.
  • Missing (sketch_type, params) entries (e.g. CountMinSketchWithHeap, not yet benchmarked) → drop that candidate silently, no crash, no stub fallback.
  • CountMinSketchWithHeap's cardinality-dependent memory: worst-case saturated bound (heap_size · avg_key_size), not a sketch-bench lookup.
  • Optimizer: cost candidates per (sketch_type, params) via sketch-bench's atomic-cost table #549
  • CountMinSketchWithHeap still costs at the flat stub — cms-heap wrapper exists but isn't wired up #651

Activity

  1. added a commit that references this issue on Aug 28, 2026
  2. milindsrivastava1997 commented on Oct 26, 2026

    @milindsrivastava1997
    ContributorAuthor

    Superseded by the rqe-optimizer MILP (ProjectASAP/sketch-bench#129, #794); the greedy optimizer was removed in #807. Remaining work tracked under #790 / ProjectASAP/sketch-bench#143. Per-(sketch, sketch_config) costs are now loaded at runtime from sketch-bench's study_saturation.py --phase optimizer-cost table (asap-planner-rs/src/optimizer/atomic_costs.rs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions