[PATCH] elf: Make _dl_sort_maps prefer default DFS algorithm

Wilco Dijkstra <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <PAWPR08MB8982C49DAE9B72249AC27F5A83DB2@PAWPR08MB8982.eurprd08.prod.outlook.com>
Hi,

>On 13/08/26 09:16, litenglong wrote:
>> The default dynamic_sort tunable is 2, which maps to
>> dso_sort_algorithm_dfs.  Update the likely branch to match the
>> default, without changing behavior for valid tunable values.
>
> What does this change really gain here? I am inclined to avoid this kind of
> code churn.

Is this code executed frequently or is the sorting only done once? It the latter,
it cannot help. And if the sorting itself is expensive, it would be more useful to
optimize that instead.

So removing the __glibc_likely is best overall.

Cheers,
Wilco
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.