Access Pattern Bench (inefficient)

Version's name: Access Pattern Bench (inefficient) ; a version of the Access Pattern Bench program.
Repository: [home] and version downloads: [.zip] [.tar.gz] [.tar.bz2] [.tar]
Patterns and behaviours: Recommended best-practices:

Description

This version of Access Pattern Bench represents inefficient strided accesses to memory. This can happen if the design of data structures in an application is different than the way data is accessed and processed. A common example is using lists of classes or structs, also called Array of Structures (AoS). Although maintainability and readability might improve using such constructs it might lead to performance degradation if data is not accessed in a linear fashion due to inefficient cache usage.

Another example are random or indirect accesses to memory. This additional indirection or unpredictability might also lead to strided accesses and can also prevent the compiler from vectorizing the code.

How to Build & Run

The repository provides a detailed README file with a description and instructions how to build, run and evaluate results. Further, each benchmark has a Makefile with different targets (realease, debug, likwid, extrae) and the option to change parameters like problem size, stride and number of iterations. For this version of Access Pattern Bench however, we focus on how to build and run examples for following inefficient access patterns.

Array of Structures (AoS)

# change to benchmark directory
cd src/AoS_SoA/

# only builds AoS
EXE_NAME="AoS_only.exe" CUSTOM_COMPILE_FLAGS="-DUSE_SOA=0" make release

# run the resulting executable
./AoS_only.exe

Random & Indirect Access

# change to benchmark directory
cd src/Random_Access/

# only builds random access
EXE_NAME="random_access.exe" CUSTOM_COMPILE_FLAGS="-DUSE_STRIDED_ACCESS=0" make release

# run the resulting executable
./random_access.exe

Strided Access

# change to benchmark directory
cd src/Random_Access/

# only builds strided access
EXE_NAME="strided_access.exe" STRIDE=8 CUSTOM_COMPILE_FLAGS="-DUSE_RANDOM_ACCESS=0" make release

# run the resulting executable
./strided_access.exe
The following experiments have been registered: