Skip to content

Verify the KLL rank-error constant against asap_sketchlib's KLL #944

Open

Description

@GordonYuanyc

Problem

kll.rs sizes and certifies KLL with ε = 2.296 / k^0.9723. This is Apache DataSketches' empirical fit for its own KLL. The executor runs asap_sketchlib::Kll, and the constant may not hold for it. sketchlib's own test only checks a looser bound, 2.446 / k^0.9433. At k = 269 that bound is 1.25%, while the Planner certifies 1.00%.

Why it happens

The constant was carried over from DataSketches. sketchlib compacts on a different schedule: level 0 compacts as soon as it is over capacity, and odd-sized levels are halved whole.

Resolution

Measure sketchlib's KLL rank error at the k that kll_k picks, then keep or refit the constant.

Scope and acceptance

  • Many seeds, several n and value distributions, and merged states.
  • Results recorded next to the constant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

accuracyAccuracy requirements, guarantees, and propagationtestingCorpus, regression, differential, or benchmark tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions