Skip to content

frontier: hoist rebuild check out of update_iter#797

Merged
frankmcsherry merged 1 commit into
TimelyDataflow:masterfrom
antiguru:mutable-antichain-shrink
May 23, 2026
Merged

frontier: hoist rebuild check out of update_iter#797
frankmcsherry merged 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
@frankmcsherry
Copy link
Copy Markdown
Member

Reads well to me; thank you!

@frankmcsherry frankmcsherry merged commit e76642f into TimelyDataflow:master May 23, 2026
9 checks passed
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.

2 participants