From: Patrick Steinhardt <ps@pks.im>
To: "René Scharfe" <l.s.r@web.de>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] use commit_stack instead of prio_queue in LIFO mode
Date: Thu, 19 Mar 2026 08:19:42 +0100 [thread overview]
Message-ID: <abujjg-8hwPPlkMU@pks.im> (raw)
In-Reply-To: <05fc946f-6670-46e9-a058-231ee464029d@web.de>
On Tue, Mar 17, 2026 at 10:40:07PM +0100, René Scharfe wrote:
> A prio_queue with a NULL compare function acts as a stack -- the last
> element in is the first one out (LIFO). Use an actual commit_stack
> instead where possible, as it documents the behavior better, provides
> type safety and saves some memory because prio_queue stores an
> additional tie-breaking counter per element.
Right. I doubt that the memory improvement will really make much of a
difference, but I agree that using a commit stack makes the intent
clearer.
The changes all look as expected to me. Thanks!
Patrick
prev parent reply other threads:[~2026-03-19 7:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 21:40 [PATCH] use commit_stack instead of prio_queue in LIFO mode René Scharfe
2026-03-19 7:19 ` Patrick Steinhardt [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=abujjg-8hwPPlkMU@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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