Proxy time adapter - #904
Draft
frankmcsherry wants to merge 2 commits into
Draft
frankmcsherry wants to merge 2 commits into
frankmcsherry wants to merge 2 commits into
Conversation
A proxy backend names `type Time: Timestamp + Lattice + From<T>`, the time in which the tactic reasons and in which bridges, seeds, matches and emitted records are presented. The tactics convert only frontiers: the join's meet, and the reduce's `upper`, held capabilities, and carried times (back through `T: From<Time>`). `std`'s reflexive `From` makes `Time = T` the unchanged default, which the reference `VecReduceBackend` uses. This separates the timestamp a dataflow advertises from the representation its operators compute with: a backend whose times are dynamically sized can present them to the tactic as a fixed-width, `Copy` value. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MYmDrD6KjihNREYsBvmTpP
A DDIR time is `Product<u64, PointStamp<u64>>`. Its dynamically sized `PointStamp` is what the scope structure needs, but it spills to the heap two scopes deep, and every clone, join and comparison in the proxy tactics walks a vector. An operator knows its scope depth when rendered, and every time it sees has at most that many scope coordinates. `corgi::flat::Flat<K>` holds the epoch and scope coordinates in a `[u64; K]`, padding with zeros where `PointStamp` strips them, so both forms are canonical and their orders agree. It is `Copy`, never allocates, and converts to and from `Time` with `From`, which the proxy tactics use for frontiers. It is never a dataflow's timestamp, so its only path summary is the identity, `()`. `RowTime` reads and writes it directly against a `ColTimes` lane column. The Corgi join and reduce backends take the tactic's time as a parameter, and `Backend::join` and `Backend::reduce` now receive the scope depth, from which Corgi picks `Flat<depth + 1>` up to depth 3, and `Time` itself beyond. Tests check the conversions round-trip and preserve order, join and meet, and that reduce presentation agrees in both representations. Corgi, 1 worker, 5 interleaved runs, medians (master-next -> this): scc 200k edges, 200 x 50 load 713 -> 630 ms churn 4.08 -> 3.47 s count 1M rows, 200 x 500 load 101 -> 95 ms churn 2.28 -> 1.79 s reach 2M edges, 100 x 100 load 805 -> 733 ms churn 484 -> 437 ms kcore 200k edges, 200 x 50 within noise Outputs match; interactive tests pass; AoC 2023 corgi 33/33. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MYmDrD6KjihNREYsBvmTpP
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support to allow a proxy backend to use a different time type than advertised by the tactic. This is primarily to advertise a dynamic timestamp like
Pointstamp<T>but specialize it to[T; K]behind the scenes.