From: Alan Modra <amodra@gmail.com>
To: Michael Matz <matz@suse.de>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] Only use wild_sort_fast
Date: Mon, 28 Nov 2022 12:46:00 +1030 [thread overview]
Message-ID: <Y4QZ4LV6JHwbh0yb@squeak.grove.modra.org> (raw)
In-Reply-To: <alpine.LSU.2.20.2211251602070.24878@wotan.suse.de>
On Fri, Nov 25, 2022 at 04:04:51PM +0000, Michael Matz via Binutils wrote:
> there's no reason why the tree-based variant can't always be used
> when sorting is required, it merely needs to also support filename
> sorting and have a fast path for insertion at end (aka rightmost tree
> leaf).
>
> The filename sorting isn't tested anywhere and the only scripttempl
> that uses it is avr (for 'SORT(*)(.ctors)'), and I believe even there it
> was a mistake. Either way, this adds a testcase for filename sorting as
> well.
>
> Then the non-BST based sorting can be simplified to only support
> the fast case of no sorting required at all (at the same time renaming
> the two variants to _sort and _nosort).
> ---
> Regtested on Alans target-list. It doesn't bring any measurable speedup,
> but I like the code better: if sorting is needed there should be a single
> reasonably quick sorting method, not two mediocre ones (one incomplete,
> the other slow).
>
> Okay for master?
OK.
--
Alan Modra
Australia Development Lab, IBM
prev parent reply other threads:[~2022-11-28 2:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 16:04 Michael Matz
2022-11-28 2:16 ` Alan Modra [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=Y4QZ4LV6JHwbh0yb@squeak.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=matz@suse.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).