Thread (2 messages) flat view 2 messages, 2 authors, 2026-01-14

Re: [PATCH v2 08/18] midx-write.c: don't use `pack_perm` when assigning `bitmap_pos`

From: Taylor Blau <hidden>
Date: 2026-01-14 21:40:42

On Wed, Jan 14, 2026 at 01:13:17PM -0800, Junio C Hamano wrote:
Taylor Blau [off-list ref] writes:
quoted
But the process is completely unnecessary in the first place: we are
enumerating all values of `ctx->info`, and there is no reason to process
them in a different order than they appear in memory. Index `ctx->info`
directly to reflect that.
As long as pack_perm[] is permutations of [0..ctx->nr-1], it does
not matter, as we are clearing all the [0..ctx->nr-1] range anyway,
in other words?
That's right. The contents of ctx->pack_perm here aren't so important
since it doesn't matter what order we consider the pack_info structs in.
As long as we see all of them we are OK, hence iterating over the
ctx->info array directly rather than in the permuted order given by
pack_perm.

Thanks,
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help