cache-line-optimization
CommunityPrevent false sharing with cache-line padding.
Software Engineering#performance#optimization#concurrency#rust#atomic#cache-line-padding#false-sharing
Authormaschad
Version1.0.0
Installs0
System Documentation
What problem does it solve?
False sharing occurs when multiple threads modify data that shares a cache line, causing cache invalidations and severe performance penalties. This skill teaches you how to align data structures to 64-byte cache lines in Rust to isolate hot fields and preserve throughput in multi-threaded code.
Core Features & Use Cases
- Cache-line padded wrappers for hot shared fields using 64-byte alignment
- Patterns for common data structures: producers/consumers ring buffers, per-bucket histograms, and atomic counters
- Compile-time validation of alignment and practical benchmarking guidance to verify improvements
- Practical guidance on when padding helps and how to measure its impact
Quick Start
Implement a 64-byte cache-line padded wrapper for a shared atomic field and benchmark the performance impact on your multi-threaded Rust code.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: cache-line-optimization Download link: https://github.com/maschad/my-claude/archive/main.zip#cache-line-optimization Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.