Small Idea (or is it): `reverseSort()`
Basically a more efficient shortcut for:
ary.sort();
ary.reverse();
My use-case is to use this in conjunction with pop() to remove the smallest element of an array.
Actually, the really useful thing here might be removeElementAtIndex(uint256 idx) that deletes the array element and shifts everything over. There are many arguably-jank snippets for this.
Just a thought!
Reverse is actually really fast. Initially i didn’t want to add it, but some had a use case for hashing the entire array and its reversed counterpart.
True, my non-assembly addled brain had me thinking you'd need to traverse, but forward and reverse are really "the same thing" and so maybe with assembly you just say "look at it differently"!
Say no more, I'll discuss further with ChatAI.
Removing from an array would still be cool but maybe too niche!