Skip to content

Benchmarks

Jakub Valtar edited this page Apr 12, 2020 · 13 revisions

Sorting random, uniformly distributed values.

These results are for radsort::unopt::sort. Unlike radsort::sort, the unopt version sorts the slice by all bytes of the key, not only the ones which differ between the keys, so the charts below can be considered worst-case.

High times per element when sorting short slices are caused by a constant overhead per byte of the key (calculating bucket offsets and verifying that key mapping did not change during sorting). The total running time does not change much for short slices, the constant overhead just gets spread between a growing number of elements.

As with all benchmarks, take these with a grain of salt and run your own to see how radsort behaves in your use case.

Benchmarked with Criterion on Windows 10, i7-8750H @ 2.2 GHz (disabled Turbo Boost)

Jump to: u8/i8 | u16/i16 | u32/i32 | u64/i64 | u128/i128 | f32 | f64

Sorting u8/i8

Sorting random u8/i8

Back to top

Sorting u16/i16

Sorting random u16/i16

Back to top

Sorting u32/i32

Sorting random u32/i32

Back to top

Sorting u64/i64

Sorting random u64/i64

Back to top

Sorting u128/i128

Sorting random u128/i128

Back to top

Sorting f32

Sorting random f32

Back to top

Sorting f64

Sorting random f64

Back to top

Clone this wiki locally