Access Pattern Bench (optimized)

Version's name: Access Pattern Bench (optimized) ; a version of the Access Pattern Bench program.
Repository: [home] and version downloads: [.zip] [.tar.gz] [.tar.bz2] [.tar]
Implemented best practices: Spatial locality performance improvement ·

Description

This version of Access Pattern Bench represents optimized accesses to memory tackling the problems that arise in the inefficient versions. Although readability and maintenance might slightly suffer, restructuring the design of data structures can significantly improve the performance. An example is changing Array of Structures (AoS) to Structure of Arrays (SoA) to align the design with the way data is accessed in the application.

In general, if possible avoiding strided or random accesses is recommended. That might however depend on the application and algorithm at hand.

How to Build and 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 optimized access patterns.

Structure of Arrays (SoA)

# 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

Linear Access (Strided Access with Stride=1)

# change to benchmark directory
cd src/Random_Access/

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

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