Skip to content

frontier: hoist rebuild check out of update_iter#797

Open
antiguru wants to merge 1 commit into
TimelyDataflow:masterfrom
antiguru:mutable-antichain-shrink
Open

frontier: hoist rebuild check out of update_iter#797
antiguru wants to merge 1 commit into
TimelyDataflow:masterfrom
antiguru:mutable-antichain-shrink

Conversation

@antiguru
Copy link
Copy Markdown
Member

Exploration: factor the per-update rebuild check in MutableAntichain::update_iter into a requires_rebuild helper generic only over T, and replace the two frontier.iter().any(...) calls with a single explicit for loop. Deduplicates inlined slice::Iter::any bodies across update_iter monomorphizations and drops the per-call-site closure types. On the event_driven example, total LLVM lines drop by ~1600.

Factor the per-update rebuild check in `MutableAntichain::update_iter` into
a `requires_rebuild` helper generic only over `T`, and replace the two
`frontier.iter().any(...)` calls with a single explicit `for` loop. This
deduplicates the inlined `slice::Iter::any` bodies across `update_iter`
monomorphizations and drops the per-call-site closure types.

On the `event_driven` example, total LLVM lines drop by ~1600 (`update_iter`
758, `slice::Iter::any` ~1030, offset by 287 in the new helper).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@antiguru antiguru marked this pull request as ready for review May 23, 2026 01:27
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