Skip to content

Prototype collective differences through reduce replay - #892

Open
frankmcsherry wants to merge 4 commits into
master-nextfrom
collective-diff-prototype
Open

frankmcsherry wants to merge 4 commits into
master-nextfrom
collective-diff-prototype

Conversation

@frankmcsherry

@frankmcsherry frankmcsherry commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Proxy reduce now carries opaque difference containers through presentations, history replay, accumulations, correction feedback, and emission.
The tactic has no scalar difference type or Semigroup bound.
The Vec and Corgi backends use Vec<R> containers and retain their existing user-facing difference semantics.
Keys and values retain the Copy + Ord generalization landed in #891.
Join still uses scalar differences, and the multiplication interface remains unintegrated.

The first commit introduces collective copying, grouped accumulation, zero selection, and multiplication without BatchContainer.
The second integrates reduce using aligned metadata and difference containers.
History advances and sorts metadata, then delegates sums and movement to the container.
Corrections enter a separate output history that is advanced, consolidated, and included at subsequent crossings.
The timestamp schedule is unchanged.
Backend-supplied empty storage preserves runtime schemas; reusable consolidation scratch and in-place retention avoid copying surviving sums a second time.

The integration exposes representation costs that remain unresolved:

  • Flat (value, time) metadata replaces the old value-grouped edit list, repeating value IDs and consolidating through a sorted permutation.
  • Every selection, including contiguous ranges, is materialized as row indices.
  • Accumulation gathers selected differences before summing, and wave staging copies them again where the old vectors could move them.
  • Per-key histories retain additional selection and consolidation scratch.

This is an integration experiment with measured regressions, not a performance-neutral abstraction.
Release int_proxy_bench, MODE=proxy, default sizes, medians of three runs with alternating baseline/integration order.
These measurements compare 24461268 and 09bc0c25:

Workload First commit, µs/round Integrated, µs/round Change
churn 19,561 21,698 +10.9%
multimoment 16,860 22,170 +31.5%
propagate 3,014 3,292 +9.2%

The single columnar-difference test now exercises component cancellation, incomparable timestamps, replay advancement, and correction feedback.
Validation passed: 45 DD library tests, 17 proxy integration tests, 41 Corgi unit tests, and 18 Corgi backend integration tests; one pre-existing benchmark was ignored.
Commands used the adjacent Timely checkout through a command-line Cargo patch, without dependency-file changes.

Carry aligned metadata and opaque diff containers through history maintenance and correction feedback.
Adapt Vec and Corgi reduce backends, preserving the timestamp schedule.
Extend the composed-diff example through partial-order replay.

This remains an integration experiment: scalar benchmarks regress, and flat metadata, gathered selections, and per-key scratch need further attention.
@frankmcsherry frankmcsherry changed the title Prototype collective difference containers Prototype collective differences through reduce replay Sep 21, 2026

This branch has not been deployed

No deployments
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