From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18801 invoked from network); 9 Aug 2021 06:04:05 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 9 Aug 2021 06:04:05 -0000 Received: (qmail 5143 invoked by uid 550); 9 Aug 2021 06:04:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 4095 invoked from network); 9 Aug 2021 06:04:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:cc:content-type; s=sasl; bh=x4UpwLCeqXqxNyxTFsJSQtpe0lIgpLqx 3s48XpEcArw=; b=Hmu4UF7V6vJxpQoY8TXbP/qTAnWGJIAfE+VzUX+4DOfPC7bR nCL5We+ECqTMAKj8yl9BsXUuoqozRH+UjkxTubXHaDBIZTpZD+ugSPBaP5BdTqNw 68qB4V3+gYuz5JbhDQFWUH2aFbFOntkAI/VrrTDEs3NdAzGiz0Ou1u9xLtc= X-Gm-Message-State: AOAM533iRjf8G7xemyP46TbErTrXFz2ro3tEHiuN4fLWnZYza5NTusez VVlFqBdFtXXIXY49xSdn397e2ZA3jHyJbqrwp7c= X-Google-Smtp-Source: ABdhPJwIXLsG7NG2W+mhLNEHHSm5Rsab0oq8Wg8vvxW+04pRvbTYwrUx5bHqDpzbS3JM6ar9ROCP5R3+oUiye2TJ+js= X-Received: by 2002:a50:d6cf:: with SMTP id l15mr27900687edj.319.1628489025830; Sun, 08 Aug 2021 23:03:45 -0700 (PDT) MIME-Version: 1.0 References: <20210808230535.GY13220@brightrain.aerifal.cx> In-Reply-To: <20210808230535.GY13220@brightrain.aerifal.cx> From: Olivier Galibert Date: Mon, 9 Aug 2021 08:03:35 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Rich Felker Cc: Jon Chesterfield , musl@lists.openwall.com Content-Type: multipart/alternative; boundary="000000000000e7c3d105c91a2570" X-Pobox-Relay-ID: 8F2FEBEC-F8D7-11EB-80C0-8B3BC6D8090B-92059326!pb-smtp1.pobox.com Subject: Re: [musl] [PATCH] stdlib: implement qsort_r --000000000000e7c3d105c91a2570 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yeah, the wrapper_cmp version looks rather good, I didn=E2=80=99t realize i= t would go down to one instruction. Or that an old patch would have been stalled for five months ;-) OG Le lun. 9 ao=C3=BBt 2021 =C3=A0 01:05, Rich Felker a =C3= =A9crit : > On Sun, Aug 08, 2021 at 10:21:06PM +0100, Jon Chesterfield wrote: > > On Sun, Aug 8, 2021 at 9:39 PM =C3=89rico Nogueira > wrote: > > > > > This is the favored approach, from what I understood of the discussio= ns > > > surrounding it. It's implemented with musl's namespacing rules and su= ch > > > in [1]. > > > > > > > Unsurprisingly I like your patch. > > > > > > > > It is badly optimized for some archs, unfortunately, as explained in > the > > > thread from [2]. I believe that's what's holding it up. > > > > > > [1] > > > > https://inbox.vuxu.org/musl/20210309210213.29539-1-ericonr@disroot.org/ > > > [2] > > > > https://inbox.vuxu.org/musl/20210309150320.GU32655@brightrain.aerifal.cx/ > > > > > > And that's what I get for not reading the list carefully enough. I miss= ed > > the thread > > from March entirely. > > No problem. Indeed, this was stalled because of concerns about bad > compiler behavior on some archs, but I really don't want to allow that > to dictate how we solve the problem. The compiler is doing the wrong > thing (failing to tail call) and should just be fixed. I'll probably > merge the tail-call patch as-is, or with any minimal fixes needed, > right after this release so as not to make major API changes at last > minute. > > Rich > --000000000000e7c3d105c91a2570 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yeah, the wrapper_cmp version looks rather good, I didn= =E2=80=99t realize it would go down to one instruction.=C2=A0 Or that an ol= d patch would have been stalled for five months ;-)
=
=C2=A0 OG

Le=C2=A0lun. 9 ao=C3=BBt 2021 =C3= =A0 01:05, Rich Felker <dalias@libc.o= rg> a =C3=A9crit=C2=A0:
On S= un, Aug 08, 2021 at 10:21:06PM +0100, Jon Chesterfield wrote:
> On Sun, Aug 8, 2021 at 9:39 PM =C3=89rico Nogueira <ericonr@disroot.org> wrote= :
>
> > This is the favored approach, from what I understood of the discu= ssions
> > surrounding it. It's implemented with musl's namespacing = rules and such
> > in [1].
> >
>
> Unsurprisingly I like your patch.
>
> >
> > It is badly optimized for some archs, unfortunately, as explained= in the
> > thread from [2]. I believe that's what's holding it up. > >
> > [1]
> > https://inbox.vuxu.= org/musl/20210309210213.29539-1-ericonr@disroot.org/
> > [2]
> > https://inbox.vux= u.org/musl/20210309150320.GU32655@brightrain.aerifal.cx/
>
>
> And that's what I get for not reading the list carefully enough. I= missed
> the thread
> from March entirely.

No problem. Indeed, this was stalled because of concerns about bad
compiler behavior on some archs, but I really don't want to allow that<= br> to dictate how we solve the problem. The compiler is doing the wrong
thing (failing to tail call) and should just be fixed. I'll probably merge the tail-call patch as-is, or with any minimal fixes needed,
right after this release so as not to make major API changes at last
minute.

Rich
--000000000000e7c3d105c91a2570--