sortUnstable
This function does NOT guarantee a stable sort, i.e the relative order of equal elements may change during sorting.
Due to the weaker guarantees of this function, this may be faster than the stable sort method.
Read more about stable sorting here: https://en.wikipedia.org/wiki/Sorting_algorithm#Stability
ctx has the following method:
fn lessThan(ctx: @TypeOf(ctx), a_index: usize, b_index: usize) bool
Function parameters
Parameters
A MultiArrayList stores a list of a struct or tagged union type.
Functions
- MultiArrayList
- A MultiArrayList stores a list of a struct or tagged union type.
Source
Implementation
pub fn sortUnstable(self: Self, ctx: anytype) void {
self.sortInternal(0, self.len, ctx, .unstable);
}