Re: [PATCH v2] show-branch: convert object.flags to commit-slab with uint64_t
- From
Jeff King <peff@peff.net>
- Date
- Jul 14, 2026, 22:00 UTC
- Message-ID
- <20260714220042.GC4095533@coredump.intra.peff.net>
- In-Reply-To
- <xmqqcxwps3ro.fsf@gitster.g>
On Tue, Jul 14, 2026 at 01:41:15PM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> This limitation is precisely where the concept of using a commit > slab shines. However, to truly take advantage of a commit slab, the > slab stride must be variable. If the tool is handling more than 80 > branches, for example, each commit requires a `uint64_t[2]` array > allocation (since a single `uint64_t` provides only 64 bits, while > `uint64_t[2]` can store up to 128 bits).
Yep. Going back to the last time this topic came up, I'll just point at:
https://lore.kernel.org/git/20250225011757.GA752084@coredump.intra.peff.net/
which references one of the earliest commit-slab series. Especially the part that adds arbitrary-sized bitset support, which could be useful here (patch 4 adds the bitset, patch 6 shows how it is used).
-Peff