You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature suggestion: a version of the sort method with by_key, similar to sort_by_key for slices. This would avoid in many situations to have to define a struct containing a key and a value, when maybe tuples are sufficient.
The text was updated successfully, but these errors were encountered:
Actually, I played with having a sort_by_key a long time ago. The reason I didn't include it originally is because I couldn't get it to work without having it significantly slow things down. All these radix sort libraries are really fragile, a very small change in the inner hot loops can have orders of magnitude impact on the final performance. If I recall correctly, the issue here had something to do with the compiler's ability to inline the key function.
I'll take a look in the next few days, and see if anything has changed. There have been a bunch of compiler changes in the last few years and maybe something has improved there to allow this without the performance penalty.
I don't need it anymore as I have created a struct and implemented RadixKey, but if it doesn't come without a performance penalty I think it would be a great feature.
Feature suggestion: a version of the sort method with by_key, similar to sort_by_key for slices. This would avoid in many situations to have to define a struct containing a key and a value, when maybe tuples are sufficient.
The text was updated successfully, but these errors were encountered: