Skip to content

Optimizer: cost candidates per (sketch_type, params) via sketch-bench's atomic-cost table #549

Description

@milindsrivastava1997

Carved out of #524

greedy_assign resolves AtomicCosts per candidate instead of applying one flat cost to every candidate in a run:

  • CMS/HLL/KLL candidates look up sketch-bench's exported atomic-cost table by exact (sketch, params) key — matches candidate_gen.rs's param grid exactly, no interpolation.
  • Every other AggregationType (Sum, MinMax, CountMinSketchWithHeap, Hydra, ...) keeps the existing flat stub (AtomicCosts::default()), logged with a warning so the fallback is visible rather than silent.
  • The table loads at runtime from a file path (--atomic-costs on optimizer_cli and candidate-gen-dump), not compiled in. The loader is a trivial deserialize — no raw-record math on the ASAPQuery side.
  • candidate-gen-dump --atomic-costs <path> prints each candidate's resolved cost, labeled [real]/[stub], for auditing.

Deliberately not in scope here (tracked on #524 instead):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions