Skip to content

Performance practice problems in Rust

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 23 of 23

Title Difficulty
ASCII search without lowercase copies Easy
Bounds checks: five safe ways to express access Hard
Build a byte index with one allocation Easy
Build a CSV record with one output buffer Easy
Build a report with a reusable string buffer Medium
Chains versus loops: top-k, and a function that must not allocate Medium
Compute a dot product with eight accumulator lanes Hard
const fn and compile-time evaluation Hard
Const generics: moving a size from runtime to compile time Hard
Delegate shape methods through an enum Medium
Filter records without cloning their tags Medium
Implement a custom hasher for integer keys Hard
Place inline and cold attributes on helper functions Hard
Reduce an enum’s inline size with Box Medium
Remove and return matching events with extract_if Easy
Reserve output space and report iterator size hints Medium
Reusing buffers instead of allocating per iteration Medium
Shrink an enum and inspect its layout Medium
size_hint and DoubleEndedIterator: an iterator with two ends Hard
Sorting: sort vs sort_unstable vs sort_by_cached_key Medium
Static vs dynamic dispatch Hard
Store and transpose a grid in one flat buffer Medium
Where the allocations are: the counting allocator Easy