unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org
Subject: Re: [PATCH] lib/string_map: simulate stable sorting
Date: Tue, 28 Nov 2023 09:24:56 -0400	[thread overview]
Message-ID: <87sf4q1047.fsf@tethera.net> (raw)
In-Reply-To: <y2lg469.8m90w6-too@iki.fi>

Tomi Ollila <tomi.ollila@iki.fi> writes:

> On Sat, Nov 25 2023, David Bremner wrote:
>
>> qsort(3) does not promise stability, and recent versions of glibc have
>> been showing more unstable behaviour [2]. Michael Gruber observed [1] test
>> breakage due to changing output order for message properties.
>>
>> We provide a sorting order of (key,value) pairs that _looks_ stable by
>> breaking ties based on value if keys are equal. Internally there may
>> be some instability in the case of duplicate (key,value) pairs, but it
>> should not be observable via the iterator API.
>
> I don't know (from the visible context here) why this is needed, but I
> can image it is useful, so
>
> LGTM.
>
> Tomi

Applied to release and master.

d

      reply	other threads:[~2023-11-28 13:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-25 12:33 [PATCH] lib/string_map: simulate stable sorting David Bremner
2023-11-26 16:53 ` Tomi Ollila
2023-11-28 13:24   ` David Bremner [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

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sf4q1047.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /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.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).