Skip to main content

Module memory_layout

Module memory_layout 

Source
Expand description

Memory layout optimizations for improved cache performance.

This module provides data structures and algorithms optimized for cache-friendly memory layouts, reducing memory bandwidth usage and improving performance through better spatial and temporal locality.

§Key Optimizations

  • Structure of Arrays (SoA): Better vectorization and cache usage
  • Memory Alignment: Ensure data aligns to cache line boundaries
  • Hot/Cold Data Separation: Keep frequently accessed data together
  • Prefetch-Friendly Layouts: Optimize for hardware prefetchers
  • NUMA-Aware Allocation: Optimize for multi-socket systems

Structs§

AlignedAllocator
Aligned memory allocator for cache-friendly data structures.
AlignmentConfig
Memory alignment configuration for optimal cache performance.
LayoutOptimizedAdam
Memory-optimized Adam optimizer using SoA layout.
LayoutStats
Memory layout optimization statistics.
ParameterInfo
Information about a parameter in SoA layout.
SoAOptimizerState
Structure of Arrays (SoA) layout for optimizer state.