[PATCH] Only use wild_sort_fast

Alan Modra amodra@gmail.com
Mon Nov 28 02:16:00 GMT 2022


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


More information about the Binutils mailing list