Skip to content

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions