Back to search

Institutional Repository of Vilnius University

Atminties talpyklos optimizavimo perkeliamumas šiuolaikiniame C++: empirinis duomenų išdėstymo metodų palyginimas naudojant GCC ir Clang kompiliatorius /

Abstract

dc:description

This thesis empirically measures how two production C++ compilers, GCC 16 and Clang/L LVM 22, exploit cachefriendly data layouts across two workloads compiled at three optimisation levels (-O2, -O3, -O3 -march=native) on an AMD Ryzen 7 5800X (Zen 3). The first workload is an O(N 2) Nbody particle simulation implemented in three layout variants: Array of Structures (AoS), Structure of Arrays (SoA), and a cachelinealigned AoS via alignas(64). The second is a square matrix transpose comparing rowmajor against tilecontiguous storage. Wallclock timing and hard ware performance counters are collected under controlled system state using Google Benchmark and perf_event_open. The central finding is that layout benefit depends on compiler policy, not layout alone. Tile contiguous matrix storage delivers a uniform 2.5–3.0× speedup on both compilers by eliminating cacheline and TLB waste. The SoA particle layout reduces L1d misses by 46 % on both compilers, but only GCC translates this into a 45 % wallclock gain; Clang’s stricter floatingpoint reordering policy prevents vectorisation of the inner loop by default. Cacheline alignment via alignas(64) consis tently worsens singlethreaded performance by inflating the perparticle working set.

Degree

thesis:*
Grantor dc:publisher
Institutional Repository of Vilnius University
Year dc:date
2026

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Stoškus, Karolis,

Rights

dc:rights
Statement dc:rights
  • info:eu-repo/semantics/openAccess
Language dc:language
lit

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
Vilnius University
Base URL
epublications.vu.lt/oai
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
related terms
citation

Stoškus, Karolis,. Atminties talpyklos optimizavimo perkeliamumas šiuolaikiniame C++: empirinis duomenų išdėstymo metodų palyginimas naudojant GCC ir Clang kompiliatorius /. Institutional Repository of Vilnius University, 2026. https://repository.vu.lt/VU:ELABAETD308338756&prefLang=en_US