Repository navigation
Invalidations 5/6 (WIP): column-major iteration, drop zip/Generator overrides - #343
Draft
asinghvi17 wants to merge 3 commits into
Draft
asinghvi17 wants to merge 3 commits into
asinghvi17 wants to merge 3 commits into
Conversation
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
added this pull request to stack #342
October 8, 2026 15:40
This was referenced Oct 8, 2026
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.
🚧 Under development, not ready for review. Part 5/6, on #341.
Makes iteration column-major and removes the
Base.zip,Base.Generatorandeachindexoverrides. This is #333 by @Beforerr, cherry-picked. Those overrides cause most of the invalidations left after #341, and almost all of thePkg.precompile()slowdown afterusing DiskArrays. Column-major iteration also fixes[t for t in zip(da, da)], which comes out in scrambled order today.@implement_zipand@implement_generatorbecome deprecated no-ops.Invalidation numbers will be added once the I/O approach is settled.
🤖 Generated with Claude Code
https://claude.ai/code/session_019Dfq6aDr3GqA8w61TsvMsc