{"id":{"repo_id":"vilnius","oai_identifier":"oai:vu.lt:elaba:308338756"},"canonical_url":"https://search.ndltd.org/etd/vilnius/oai:vu.lt:elaba:308338756","repository":{"repo_id":"vilnius","name":"Vilnius University","base_url":"https://epublications.vu.lt/oai"},"display":{"title":"Atminties talpyklos optimizavimo perkeliamumas šiuolaikiniame C++: empirinis duomenų išdėstymo metodų palyginimas naudojant GCC ir Clang kompiliatorius /","abstract":"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.","abstract_html":"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.","abstract_has_math":false,"creators":["Stoškus, Karolis,"],"institution":"Institutional Repository of Vilnius University","degree_name":null,"degree_level":null,"degree_discipline":null,"degree_department":null,"school":null,"contributors":[],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026","date_published":"2026","updated_at":"2026-11-19T10:12:59Z","subjects":[],"languages":["lit"],"rights":["info:eu-repo/semantics/openAccess"],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://repository.vu.lt/VU:ELABAETD308338756&prefLang=en_US","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"https://repository.vu.lt/VU:ELABAETD308338756&prefLang=en_US","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","download_url":null,"download_label":null,"download_source":null,"access_status":"open","embargo_until":null,"access_note":null},"source_record":{"url":"https://epublications.vu.lt/oai?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Avu.lt%3Aelaba%3A308338756","prefix":"oai_dc"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:creator","label":"Author","values":["Stoškus, Karolis,"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2026"]},{"key":"dc:publisher","label":"Institution","values":["Institutional Repository of Vilnius University"]},{"key":"dc:relation","label":"Dc Relation","values":["https://epublications.vu.lt/object/elaba:308338756/308338756.pdf"]},{"key":"dc:type","label":"Dc Type","values":["info:eu-repo/semantics/bachelorThesis"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["lit"]},{"key":"dc:rights","label":"Dc Rights","values":["info:eu-repo/semantics/openAccess"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://repository.vu.lt/VU:ELABAETD308338756&prefLang=en_US"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["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."]},{"key":"dc:format","label":"Dc Format","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Atminties talpyklos optimizavimo perkeliamumas šiuolaikiniame C++: empirinis duomenų išdėstymo metodų palyginimas naudojant GCC ir Clang kompiliatorius /","Cache optimization portability in modern c++: an empirical comparison of data layout techniques across gcc and clang compilers."]}]}],"canonical_facts":{"dc:creator":["Stoškus, Karolis,"],"dc:date":["2026"],"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."],"dc:format":["application/pdf"],"dc:identifier":["https://repository.vu.lt/VU:ELABAETD308338756&prefLang=en_US"],"dc:language":["lit"],"dc:publisher":["Institutional Repository of Vilnius University"],"dc:relation":["https://epublications.vu.lt/object/elaba:308338756/308338756.pdf"],"dc:rights":["info:eu-repo/semantics/openAccess"],"dc:title":["Atminties talpyklos optimizavimo perkeliamumas šiuolaikiniame C++: empirinis duomenų išdėstymo metodų palyginimas naudojant GCC ir Clang kompiliatorius /","Cache optimization portability in modern c++: an empirical comparison of data layout techniques across gcc and clang compilers."],"dc:type":["info:eu-repo/semantics/bachelorThesis"]},"updated_at":"2026-11-19T10:12:59Z"}