Conversation
How about making JITing of the in-memory portion qsort your next task? ;)
1
2
Replying to
I was thinking of adding more qsort specializations to make SortTuple structs smaller in some cases (24 bytes -> 16) anyway. Found this sped up CREATE INDEX CONCURRENTLY TID sort quite nicely. Maybe JITing would be the easiest way to do this.
Replying to
I think it's worth a try - I suspect it'll often end up being faster and definitely less duplicative, but ...
1
FWIW, not having thought this through, it doesn't sound hard: Create jit context, use it to create wrapper function calling pg_qsort with constant comparator, force inlining to be enabled, use created function. ~30-60 LOC.
1
Show replies

