A new AI generated sorting algorithm for 3, 4, and 5 element sequences claims up to a 70% performance improvement. We do a fair amount of stuff that is closely related to three element sorting in OCIO (tetrahedral interpolation, hue calculation, 3d-LUT inversion), so it would be interesting to see if we could leverage this. It should be available in the C++ standard library at some point, but we don't always use that.
A new AI generated sorting algorithm for 3, 4, and 5 element sequences claims up to a 70% performance improvement. We do a fair amount of stuff that is closely related to three element sorting in OCIO (tetrahedral interpolation, hue calculation, 3d-LUT inversion), so it would be interesting to see if we could leverage this. It should be available in the C++ standard library at some point, but we don't always use that.
https://www.deepmind.com/blog/alphadev-discovers-faster-sorting-algorithms
Code is available here. Wondering if it would be more compact using intrinsics? https://reviews.llvm.org/D118029