From: Taylor Blau Date: Wed, 27 May 2026 14:36:47 GMT Subject: Re: [PATCH 2/8] pack-bitmap: check subtree bits before recursing Message-ID: In-Reply-To: <20260527090348.GC981444@coredump.intra.peff.net> On Wed, May 27, 2026 at 05:03:48AM -0400, Jeff King wrote: > On Tue, May 19, 2026 at 12:12:39PM -0400, Taylor Blau wrote: > > > In the previous commit, we adjusted the callers of `fill_bitmap_tree()` > > to pass in the bit position of the tree they wish to fill. > > > > This commit makes use of that information at the call site to avoid > > setting up a stack frame for fill_bitmap_tree() entirely whenever a > > tree's bit position is already set. > > OK, this one at least has a plausible explanation. ;) > > I can reproduce your speedup on linux.git (~5% again). I don't love that > we have to duplicate the logic in each of the callers, but there are > only two sites (and unlikely to ever be more). And it is only one line, > the comment notwithstanding. That seems like a good tradeoff for a > multiple-second speedup. Yup, exactly. There are naturally only two callers: one to handle a commit's root tree, and another for recursive calls to handle subtrees. As a result, I'm OK with the duplication here. Thanks, Taylor