Skip to content

refactor: tighten KLL API and query performance - #263

Merged
tisonkun merged 23 commits into
mainfrom
codex/kll-api-and-performance
Sep 2, 2026
Merged

refactor: tighten KLL API and query performance#263
tisonkun merged 23 commits into
mainfrom
codex/kll-api-and-performance

Conversation

@tisonkun

@tisonkun tisonkun commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

  • rename KLL internals around their responsibilities and align visibility with the rest of the crate
  • encode item ordering in Ord, support custom orderings through newtypes, and provide KllFloat for non-NaN floating-point values
  • align KLL queries with REQ through shared SearchCriteria, explicit inclusive/exclusive selection, fallible validation, batch quantiles, and a reusable SortedView
  • reject invalid merges before mutation and improve invariant diagnostics
  • cache retained/capacity state, avoid unnecessary sorted views, merge sorted levels directly, and streamline compaction
  • standardize truncated-input checks and expected/available byte diagnostics across sketch deserializers
  • reorganize deterministic KLL coverage, enable Go compatibility fixtures, and add update, query, merge, and serialization benchmarks

Breaking changes

  • import SearchCriteria from datasketches::common and select Inclusive or Exclusive explicitly
  • custom KLL item types now implement Ord and KllValue; floating-point sketches use KllFloat<f32> or KllFloat<f64>

Validation

  • cargo x check
  • cargo x test
  • cargo x lint
  • cargo bench -p benchmarks --no-run

Comment thread CHANGELOG.md Outdated
@tisonkun
tisonkun enabled auto-merge (squash) September 2, 2026 07:30
@tisonkun
tisonkun merged commit 98cbdc0 into main Sep 2, 2026
10 checks passed
@tisonkun
tisonkun deleted the codex/kll-api-and-performance branch September 2, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant