Marshall Lochbaum
Marshall Lochbaum
Thanks for taking a pass through the APL characters (and sorry for contributing to the Hacker News rush). If you decide to come back, here are the ones that I...
I was able to adapt pdqsort's method for handling many equal values, which brings the performance on the "generic" case roughly in line with pdqsort. Pushed to https://github.com/mlochbaum/fluxsort . There...
No, I guess it isn't. I'd been thinking about ensuring that the maximum element doesn't get swapped with anything less than it, but the element at the end winds up...
Remark on psuedomedians: the order of the candidates does matter, and I think both pdqsort and flux are too systematic. I haven't analyzed the 15-candidate version, but the case with...
I was just wondering if it makes sense to search for an initial run at the beginning of `flux_partition` every time. Best case is a complete run of course. If...
I think that strategy is entirely reasonable, actually, and it doesn't even add much to the code size. It should be able to do the median in already-allocated memory (in...
From [this answer](https://stats.stackexchange.com/a/86804), medians follow a beta distribution: the probability that a median of `m` is found `p` of the way along the actual distribution is proportional to `p^(m/2) *...
My branch uses the `sqrt(n/(1+log_4(n))) / 2` value (but it computes the gap size, which works out to `sqrt(2*n*(2+log_2(n)))`). Decreasing the number of pivots definitely increases the time on shuffled...
I've also been looking at insertion sort. Replacing quadsort with insertion sort directly is slightly slower, but removing all the quadsort calls and running unguarded insertion sort on the entire...
I'm also very interested in pivot selection. I'd never have guessed that stopping at 9 (or 15 even!) candidates is measurably worse. I just added randomization to the 15-candidate version,...