
Performance
Reducing Allocations in Rust and Finding the Hot Ones
Find where a Rust program allocates with a profiler or an allocation counter, then remove the hot ones: reuse buffers, borrow, pre-size and avoid format in loops.
3 min read
Tag
1 post

Find where a Rust program allocates with a profiler or an allocation counter, then remove the hot ones: reuse buffers, borrow, pre-size and avoid format in loops.