From: "René Scharfe" <l.s.r@web•de>
To: Derrick Stolee <stolee@gmail•com>, Git List <git@vger•kernel.org>
Subject: Re: [PATCH] show-branch: use prio_queue
Date: Mon, 29 Dec 2025 21:01:58 +0100 [thread overview]
Message-ID: <c30ebbab-e303-4301-971b-7ff619389597@web.de> (raw)
In-Reply-To: <01d09293-4b60-4a47-9350-73b1ff796c9a@gmail.com>
On 12/29/25 7:09 PM, Derrick Stolee wrote:
> On 12/26/2025 2:44 AM, René Scharfe wrote:
>
>> That number is not limited, though, and in pathological cases like the
>> one in p6010 we see a sizable improvement:
>>
>> Test v2.52.0 HEAD
>> ------------------------------------------------------------------
>> 6010.4: git show-branch 2.19(2.19+0.00) 0.03(0.02+0.00) -98.6%
>
> I love to see improvements like this, even if the construction is
> unlikely to exist in reality. I do think it's likely to be valuable
> for some large repos with many parallel branches.
>
> Indeed, I tested this patch against a monorepo with lots of merges
> with hyperfine, getting this output:
>
> Benchmark 1: old
> Time (mean ± σ): 3.303 s ± 0.146 s [User: 0.058 s, System: 0.069 s]
> Range (min … max): 3.162 s … 3.631 s 10 runs
>
> Benchmark 2: new
> Time (mean ± σ): 141.7 ms ± 3.2 ms [User: 30.5 ms, System: 93.1 ms]
> Range (min … max): 137.5 ms … 149.4 ms 19 runs
>
> Summary
> new ran
> 23.31 ± 1.15 times faster than old
Woah, the perf test gets a speedup by factor 46 in a repository
purpose-built to highlight this very difference, and here you get half
of that in the wild! Interesting to see that there are real commit
histories out there with such a taxing topology.
And thanks for your review!
René
prev parent reply other threads:[~2025-12-29 20:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-26 7:44 [PATCH] show-branch: use prio_queue René Scharfe
2025-12-29 18:09 ` Derrick Stolee
2025-12-29 20:01 ` René Scharfe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c30ebbab-e303-4301-971b-7ff619389597@web.de \
--to=l.s.r@web$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
--cc=stolee@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox