Skip to content

Invalidations 5/6 (WIP): column-major iteration, drop zip/Generator overrides - #343

Draft
asinghvi17 wants to merge 3 commits into
inv/any-all-hookfrom
inv/column-major-iteration
Draft

asinghvi17 wants to merge 3 commits into
inv/any-all-hookfrom
inv/column-major-iteration

Conversation

@asinghvi17

@asinghvi17 asinghvi17 commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

🚧 Under development, not ready for review. Part 5/6, on #341.

Makes iteration column-major and removes the Base.zip, Base.Generator and eachindex overrides. This is #333 by @Beforerr, cherry-picked. Those overrides cause most of the invalidations left after #341, and almost all of the Pkg.precompile() slowdown after using DiskArrays. Column-major iteration also fixes [t for t in zip(da, da)], which comes out in scrambled order today.

Invalidation numbers will be added once the I/O approach is settled.

🤖 Generated with Claude Code

https://claude.ai/code/session_019Dfq6aDr3GqA8w61TsvMsc

Beforerr and others added 3 commits October 8, 2026 14:02
Iteration walked chunks in turn, so its order differed from the indices
Base pairs values with. `DiskZip`, `DiskGenerator` and a chunk-ordered
`eachindex` patched `zip`, generators and `collect`, but other consumers
(`Iterators.take`/`drop`, `enumerate`, `foldl`, filtered generators, and
`accumulate` through `eachindex`) silently returned wrong values, and the
`Base.zip` and `Base.Generator` methods on `AbstractDiskArray` invalidated
much compiled code (#175).

Iteration now reads blocks that are contiguous in column-major order:
whole dimensions before `k`, chunk ranges along `k`, single indices after
it, with `k` the last dimension whose blocks fit in `default_chunk_size`.
When `k` is the last dimension each chunk is read once.
`@implement_zip`, `@implement_generator` and `@implement_diskarray_skip_zip`
were public entry points for types that use the macros instead of
subtyping `AbstractDiskArray`. GitHub code search finds no callers outside
this repository, but removing a macro breaks loading, so keep them:
the first two do nothing, the last is `@implement_diskarray`, and all
three emit a deprecation warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Dfq6aDr3GqA8w61TsvMsc
The closure that builds the block grid captured `k`, which the loop
before it assigns, so `k` was boxed and JET reported it as possibly
undefined.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Dfq6aDr3GqA8w61TsvMsc
@asinghvi17
asinghvi17 added this pull request to stack #342 October 8, 2026 15:40
@asinghvi17 asinghvi17 changed the title inv/column major iteration Invalidations 5/6 (WIP): column-major iteration, drop zip/Generator overrides Oct 8, 2026

This branch has not been deployed

No deployments
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