Abstract
In many programming languages, memory access patterns exhibited by an application are dictated by the data structures defined by the programmer, which, in turn, dictate how the data are ordered in memory. Exploring access pattern optimizations is essential for performance: we demonstrate, through several benchmarks, the effects of Array of Structures (AoS) and Structure of Arrays (SoA) layouts on cache utilization, auto-vectorization, and false sharing. Despite these benefits, exploration remains a time-consuming task because it requires rewriting data structure definitions and, very often, computing kernel code to accommodate these changes. We argue that such changes could and should be automated. In this work, we propose the design of a C++ framework for automatically redefining data structures to modify the data layout and access patterns. Leveraging experimental C++26 reflection and token injection features, we can modify the structure while preserving the original C++ syntax for accessing data. Our framework enables rapid prototyping of access pattern optimizations, potentially unlocking significant performance gains.
| Original language | English |
|---|---|
| Title of host publication | ICPE Companion 2025 |
| Subtitle of host publication | Companion of the 16th ACM/SPEC International Conference on Performance Engineering |
| Publisher | Association for Computing Machinery |
| Pages | 47-53 |
| Number of pages | 7 |
| ISBN (Electronic) | 979-8-4007-1130-5 |
| DOIs | |
| Publication status | Published - 5 May 2025 |
| Event | 16th ACM/SPEC International Conference on Performance, ICPE 2025 - Toronto, Canada Duration: 5 May 2025 → 9 May 2025 Conference number: 16 |
Publication series
| Name | ICPE Companion 2025 - Companion of the 16th ACM/SPEC International Conference on Performance Engineering |
|---|
Conference
| Conference | 16th ACM/SPEC International Conference on Performance, ICPE 2025 |
|---|---|
| Abbreviated title | ICPE 2025 |
| Country/Territory | Canada |
| City | Toronto |
| Period | 5/05/25 → 9/05/25 |
UN SDGs
This output contributes to the following UN Sustainable Development Goals (SDGs)
-
SDG 9 Industry, Innovation, and Infrastructure
Keywords
- array of structures
- array of structures of arrays
- automatic layout transformations
- c++ reflection
- data layouts
- memory access patterns
- structures of arrays
Fingerprint
Dive into the research topics of 'Optimizing Memory Access Patterns through Automatic Data Layout Transformation (Work in Progress Paper)'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver