Avoid allocation of small arrays in median, extrema, etc

The direct link is

(Referencing via Resg… can trigger email spamming, see the criticism section on Wikipedia)

2 Likes

Thank you, I’ve changed the link, was copying from the phone, sorry.

Thanks, these look neat.

BTW, a slightly less awful algorithm than unrollmedian above is to use TupleTools.sort(x).

1 Like

May be of interest:
Sorting via branch’s.

https://github.com/JeffreySarnoff/SortingNetworks.jl

1 Like