Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 9 Mar 2021 12:11:37 +0300 (MSK)
From: Alexander Monakov <amonakov@...ras.ru>
To: musl@...ts.openwall.com
cc: √Črico Nogueira <ericonr@...root.org>
Subject: Re: [PATCH v2] add qsort_r.

On Tue, 9 Mar 2021, √Črico Nogueira wrote:

> since most discussion around the addition of this function has centered
> around the possible code duplication it requires or that qsort would
> become much slower if implemented as a wrapper around qsort_r

How much is "much slower", did anyone provide figures to support this claim?
The extra cost that a wrapper brings is either one indirect jump instruction,
or one trivially-predictable conditional branch per one comparator invocation.

Constant factor in musl qsort is quite high, I'd be surprised if the extra
overhead from one additional branch is even possible to measure.

Alexander

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.