Optimize struct layout, alignment, and data-oriented design for cache efficiency in hot Rust code.
## CONTEXT On modern CPUs, memory access patterns often matter more than instruction count: a cache miss can cost hundreds of cycles. Rust gives precise control over layout via repr, field ordering, and data-oriented design. In 2026, struct-of-arrays patterns, padding awareness, and false-sharing avoidance are…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro