Linear Haskell QuickSort Performance

Hello,
I’ve been investigating on this performance issue in the last 2 days.
First I looked at Core output for the linear array quicksort in 9.4, but couldn’t find anything obvious that wouldn’t be optimized. In particular, I didn’t notice any tuple left in the Core, they have probably been all optimized away. Of course, most Ur were still there, but that was to be expected.

I consolidated my experiments in a benchmark that I plan to integrate into linear-base, here: [WIP] Add LinArray vs naive Quicksort performance benchmark by tbagrel1 · Pull Request #477 · tweag/linear-base · GitHub. Results in 9.4 seems to be similar to yours, but we see a very noticiable improvement of the linear array quicksort when using 9.8. I don’t know precisely which GHC change is responsible for this though.

Let me know if you still need more info/investigation on this case.

8 Likes