sort_int

Function sort_int 

Source
pub fn sort_int<T: Ord + Copy>(slice: &mut [T])
Expand description

Performs in-place unstable sorting of integer slices with optimal performance.

High-performance sorting function optimised for integer types using unstable sort algorithms that prioritise speed over preserving the relative order of equal elements.

§Type Parameters

  • T: Integer type implementing Ord + Copy (i8, i16, i32, i64, u8, u16, u32, u64, etc.)

§Parameters

  • slice: Mutable slice to be sorted in-place

§Usage Example

use simd_kernels::kernels::sort::sort_int;

let mut data = [64i32, 34, 25, 12, 22, 11, 90];
sort_int(&mut data);
// data is now [11, 12, 22, 25, 34, 64, 90]