2 posts with tag systems-programming

Cache-Conscious Data Layout in Rust: Field Zoning, False Sharing, and the 128-Byte Rule

How to lay out a shared Rust struct by who-touches-what - zoning fields by write owner and frequency, then padding the cross-core ones to avoid false sharing and prefetcher-induced contention.

· 13 minutes reading time

Architectural Decomposition: Remove Contention by Design

The opening post of a Low-Level Systems Design in Rust series, arguing that the biggest performance win is structural: replace a shared multi-producer cursor that serializes cores through cache-coherence traffic with one private single-writer SPSC ring per producer, converting quadratic writer contention into a cheap O(N) consumer sweep.

· 9 minutes reading time