On Tue, Jun 29, 2021 at 1:11 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> I spotted a mistake in v3: I didn't rename ST_COMPARE_TYPE to
> ST_COMPARE_RET_TYPE in the 0009 patch (well, I did, but forgot to
> commit before I ran git format-patch). I won't send another tarball
> just for that, but will correct it next time.
Here's a version that includes a rather hackish test module that you
might find useful to explore various weird effects. Testing sorting
routines is really hard, of course... there's a zillion parameters and
things you could do in the data and cache effects etc etc. One of the
main things that jumps out pretty clearly though with these simple
tests is that sorting 6 byte ItemPointerData objects is *really slow*
compared to more natural object sizes (look at the times and the
MEMORY values in the scripts). Another is that specialised sort
functions are much faster than traditional qsort (being one of the
goals of this exercise). Sadly, the 64 bit comparison technique is
not looking too good in the output of this test.