Tag

prefetching

0 views collected around this technical thread.

Tencent Cloud Developer
Tencent Cloud Developer
Apr 25, 2024 · Fundamentals

Cache, Prefetching, False Sharing, Pipeline and Data Dependency: Performance Optimization in Rust

The article uses Rust benchmarks to show how cache layout, prefetching, associativity, false sharing, pipeline stalls, and loop data dependencies impact performance, and demonstrates practical optimizations such as row‑major traversal, proper alignment, avoiding dependent loops, and leveraging sequential access to achieve near‑optimal speed.

CPU cachePipelinedata dependency
0 likes · 17 min read
Cache, Prefetching, False Sharing, Pipeline and Data Dependency: Performance Optimization in Rust
Tencent Technical Engineering
Tencent Technical Engineering
Apr 2, 2024 · Fundamentals

Cache, Prefetching, False Sharing, Pipeline, and Data Dependency: Benchmarks and Optimizations in Rust

The article shows how row‑major vs column‑major traversal, random access, cache‑set conflicts, false sharing, branch‑prediction failures, and loop‑carried data dependencies each degrade performance by tying Rust (and C++) code patterns to CPU cache behavior, prefetching, pipeline stalls, and vectorization limits, demonstrated through runnable benchmarks.

BenchmarkCPU cachePipeline
0 likes · 15 min read
Cache, Prefetching, False Sharing, Pipeline, and Data Dependency: Benchmarks and Optimizations in Rust