|
|
Message-ID: <CAH8yC8nT=DfckVVxdcfE95+_4PPwGBw9vX-8rXdZE0LfzFnktw@mail.gmail.com> Date: Sat, 18 Apr 2026 21:33:44 -0400 From: Jeffrey Walton <noloader@...il.com> To: musl@...ts.openwall.com Cc: "dalias@...ifal.cx" <dalias@...ifal.cx>, "mailto.luca.kellermann@...il.com" <mailto.luca.kellermann@...il.com>, David Sparks <sparks05@...ton.me> Subject: Re: Some additional qsort patches On Tue, Apr 14, 2026 at 9:07 PM David Sparks <sparks05@...ton.me> wrote: > [SNIP, SNIP, SNIP] > I will prepare a smaller revised patch set. > > There are two additional changes I could prepare if you're > interested in seeing them, but I held off for fear of the > magnitude of the surgery: > > 1) Using __uint128_t (or uint64_t on 32-bit) for the tree-size > bitmap. This would require a chunk of ugly preprocessor > code to find the appropriate data type, plus the current > code as a fallback. __uint128_t is available in GCC or Clang when __SIZEOF_INT128__ >= 16. See <https://gcc.gnu.org/pipermail/gcc-help/2015-August/124862.html>. > 2) Saving a compare in trinkle(). There seem to be two ways > to go about this: > 2a) Move the top level of sift() into trinkle(), and have > the call to sift() take the appropriate subtree, or > 2b) Implement a do_sift() helper which takes the root compare > as an argument and can be used by both sift() and > trinkle(). (This has the potential to take an ar[] array > as well and merge the cycle() operations.) Jeff
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.