kth.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
En prestandajämförelse mellan objektorienterad design och dataorienterad design i C++, Java och Java Project Valhalla
KTH, School of Engineering Sciences in Chemistry, Biotechnology and Health (CBH), Biomedical Engineering and Health Systems, Health Informatics and Logistics.
KTH, School of Engineering Sciences in Chemistry, Biotechnology and Health (CBH), Biomedical Engineering and Health Systems, Health Informatics and Logistics.
2023 (Swedish)Independent thesis Basic level (university diploma), 10 credits / 15 HE creditsStudent thesisAlternative title
A performance comparison between object-oriented design and data-oriented design in C++, Java, and Java Project Valhalla (English)
Abstract [sv]

Datorspel behöver utnyttja hårdvara effektivt för att kunna vara tillgänglig på så många system som möjligt med varierande kapacitet. En viktig del i detta är att optimera användandet av processorns cacheminnen. Programmerare kan följa en dataorienterad design för att implementera cacheeffektiv kod. Detta förutsätter att programmeraren har kontroll över hur data lagras i minnet, vilket är svårt att uppnå i Java. Project Valhalla kan erbjuda funktioner för att åtgärda detta problem.

I detta arbete jämfördes objektorienterad design med dataorienterad design i språken C++, Java och den pågående utvecklingen av Project Valhalla. En prototyp utvecklades och implementerades med olika kombinationer av dessa språk och designer. För varje implementation mättes prestanda och cacheeffektivitet. Resultatet visade att Java med Project Valhalla kan uppnå liknande prestanda som C++ vid dataorienterade implementationer. På grund av vissa begränsningar i Valhallas funktioner kommer det troligtvis inte bli ett praktiskt alternativ till lågnivåspråk inom en snar framtid.

Abstract [en]

Computer games need to utilize hardware efficiently in order to be available on as many systems as possible with varying capabilities. An important part of this is to optimize the use of the CPU’s cache. A programmer can follow a data-oriented design to implement cache-efficient code. This requires the programmer to have control over how data is stored in memory, which is difficult to achieve in Java. Project Valhalla may offer features to address this issue.

In this thesis, object-oriented design was compared with data-oriented design in the languages C++, Java, and the ongoing development of Project Valhalla. A prototype was developed and implemented using different combinations of these languages and designs. For each implementation, performance and cache efficiency were measured. The result showed that Java with Project Valhalla can achieve similar performance to C++ in data-oriented implementations. Due to some limitations in Valhalla's features, it is unlikely that it will become a suitable alternative to low-level languages anytime soon.

Place, publisher, year, edition, pages
2023. , p. 51
Series
TRITA-CBH-GRU ; 2023:093
Keywords [en]
Project Valhalla, primitive classes, Java, C++, data-oriented design, object-oriented design, cache, TLB
Keywords [sv]
Project Valhalla, primitiva klasser, Java, C++, dataorienterad design, objektorienterad design, cacheminne, TLB
National Category
Computer Sciences
Identifiers
URN: urn:nbn:se:kth:diva-328365OAI: oai:DiVA.org:kth-328365DiVA, id: diva2:1763807
Subject / course
Computer Science
Educational program
Bachelor of Science in Engineering - Computer Engineering
Supervisors
Examiners
Available from: 2023-06-07 Created: 2023-06-07 Last updated: 2023-06-07Bibliographically approved

Open Access in DiVA

Exjobb_Isacsson_Andreas_Renström_Christopher(774 kB)101 downloads
File information
File name FULLTEXT01.pdfFile size 774 kBChecksum SHA-512
cd078e07740eb4fa6568f1b40f2e86fffdd5e1d726e1dc0aa6be60426f3085f720ee704363720c28439a7c61ce5219748360568e7eec7abe2ddb4fb0769a0839
Type fulltextMimetype application/pdf

By organisation
Health Informatics and Logistics
Computer Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 101 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 278 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf