Skip to main navigation Skip to search Skip to main content

Optimizing Memory Access Patterns through Automatic Data Layout Transformation (Work in Progress Paper)

  • Jolly Chen
  • , Ana Lucia Varbanescu
  • , Axel Naumann

Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademicpeer-review

32 Downloads (Pure)

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 languageEnglish
Title of host publicationICPE Companion 2025
Subtitle of host publicationCompanion of the 16th ACM/SPEC International Conference on Performance Engineering
PublisherAssociation for Computing Machinery
Pages47-53
Number of pages7
ISBN (Electronic)979-8-4007-1130-5
DOIs
Publication statusPublished - 5 May 2025
Event16th ACM/SPEC International Conference on Performance, ICPE 2025 - Toronto, Canada
Duration: 5 May 20259 May 2025
Conference number: 16

Publication series

NameICPE Companion 2025 - Companion of the 16th ACM/SPEC International Conference on Performance Engineering

Conference

Conference16th ACM/SPEC International Conference on Performance, ICPE 2025
Abbreviated titleICPE 2025
Country/TerritoryCanada
CityToronto
Period5/05/259/05/25

UN SDGs

This output contributes to the following UN Sustainable Development Goals (SDGs)

  1. SDG 9 - Industry, Innovation, and Infrastructure
    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