> On 5 Dec 2024, at 15:16, John Naylor <johncnaylo...@gmail.com> wrote: > > I tried on an older Intel chip and got similar results, so we'll go > with your original comparator:
Ack. > I believe src/port/qsort.c was meant to be just for the standard sort > interface as found in a C library. We do have one globally visible > special sort here: > src/backend/utils/sort/qsort_interruptible.c > ...so that directory seems a better fit. OK. BTW do we need ST_CHECK_FOR_INTERRUPTS? > The declaration is in > src/include/port.h, though. Note: that one doesn't have a global > wrapper around a static function -- it's declared global since > ST_SCOPE is not defined. Added static. > > And one more bikeshedding bit that might get noticed: tuplesorts > express their boolean as "reversed". We don't necessarily need to > follow that, but consistency is good for readability. I do not know if "reversed sorting order" is more idiomatic than "ascending sorting order". If you think it is - let's switch argument's name to "reversed". Best regards, Andrey Borodin.
v4-0001-Use-specialized-sort-facilities.patch
Description: Binary data