Repository navigation
Conversation
`Tracker::propagate_all` collected every frontier change of a scope in one
`ChangeBatch<(Location, T)>`. The worklist produces changes in time order
and the batch sorts by location, so the batch sorted its whole contents
each time it doubled and once more when drained. For a scope of 200
operators that sorting was 43% of the cost of advancing an input frontier.
The tracker now keeps one small batch per operator, and a list of the
operators that have changes. Changes still consolidate per location and
time, so transient changes in cyclic scopes cancel as before, but no sort
spans more than one operator. The operators listed are distinct, which
also removes the sort of `maybe_shutdown`.
`Tracker::pushed` now returns `PushedChanges`, which hands out the changes
one operator at a time. This is a breaking change for callers of `pushed`.
Measured with the new `progress_tick` example, which advances the inputs
of dataflows that carry no data and reports nanoseconds per operator per
tick. Median of five interleaved runs pinned to one core, x86-64:
dataflows x regions x operators before after
1 x 1 x 200 332.7 252.0 -24.3%
100 x 5 x 10 829.2 722.6 -12.9%
100 x 1 x 200 729.7 623.3 -14.6%
1 x 1 x 100000 1000.5 719.9 -28.0%
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Tracker::propagate_allcollected every frontier change of a scope in oneChangeBatch<(Location, T)>. The worklist produces changes in time order and the batch sorts by location, so the batch sorted its whole contents each time it doubled, and once more when drained. For a scope of 200 operators that sorting was 43% of the cost of advancing an input frontier. In continuous profiles of a production deployment, compaction of this batch type is about 3.5% of worker CPU.The tracker now keeps one small batch per operator and a list of the operators that have changes. Changes still consolidate per location and time, so transient changes in cyclic scopes cancel as before, but no sort spans more than one operator. The operators listed are distinct, which also removes the sort of
maybe_shutdown.Breaking:
Tracker::pushednow returnsPushedChanges, which hands out the changes one operator at a time.The first commit adds a
progress_tickexample that advances the inputs of dataflows carrying no data and reports nanoseconds per operator per tick. Median of five interleaved runs pinned to one core, x86-64, measured on top of v0.32.0:A simpler variant that skipped consolidation entirely was faster still, but the reachability doc test showed transient changes in a cyclic graph no longer cancelling, so I did not pursue it.
🤖 Generated with Claude Code