Corgi advance: keep a chunk's columns when nothing reorders - #903
Open
frankmcsherry wants to merge 1 commit into
Open
frankmcsherry wants to merge 1 commit into
frankmcsherry wants to merge 1 commit into
Conversation
`advance` concatenated its carried group with each new chunk (a copy), then gathered every surviving row into new columns (a second copy), and sorted each group's rows by time, one group at a time. In scc's churn rounds 3% of groups need re-sorting after advancing. Now it advances whole chunks: a chunk is complete once the next chunk starts a new group, or on `done`, and chunks that a group spans are advanced together. A group whose advanced times still ascend is left as it stands, and when no group needs re-sorting the chunk keeps its key and value columns. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ABLpEcZUPN1oAUY2usfkx
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.
CorgiChunk::advancedid three things per call that it mostly didn't need to:In scc's churn rounds only 3% of groups need re-sorting after advancing (138k of 4.4M, counted).
Now
advanceworks on whole chunks:(key, val)group, or ondone. Until then the last chunk waits, rather than being split to hold back its last group.One file, 72 lines added, 69 removed. Stands alone; no overlap with #902.
Corgi, 3 runs each, ms (load, then churn per round):
Validation: interactive tests pass, including
advance_owned_and_shared_nested_times_matches_reference, which feeds groups split across 1- and 3-row chunks. AoC 2023 passes 33/33 on corgi. The same-plan harness's output digests match compiled DD for count, count2, distinct, min, min2, reach and scc, at 1 and 4 workers.🤖 Generated with Claude Code