Evaluating the performance of object-oriented and data-oriented design with multi-threading in game development

David Wingqvist, Filip Wickström, Suejb Memeti
{"title":"Evaluating the performance of object-oriented and data-oriented design with multi-threading in game development","authors":"David Wingqvist, Filip Wickström, Suejb Memeti","doi":"10.1109/GEM56474.2022.10017610","DOIUrl":null,"url":null,"abstract":"The frame rate of a game is important for both the end-user and the developer, and for a game to be considered playable, the minimum requirement of 60 FPS should be main-tained. With respect to the programming design pattern, the current industry standard is to use Object-Oriented Design (OOD). While the demand for efficient game applications is increasing, applications developed using OOD are struggling to efficiently utilize the available computing resources and consequently meet the minimum frame-rate requirements. A design pattern that may be able to cope with the current and future requirements of resource-intensive game applications is the Data-Oriented Design (DOD), which focuses on the efficient CPU memory utilization. The main difference between OOD and DOD is related to the way data is organized and accessed. While DOD is able to efficiently utilize the cache memory, programming using the data-oriented design is perceived as much more complex compared to proagamming applications using object-oriented design. In this paper, we will first develop a simple game application using both programming design patterns. Thereafter, we evaluate the performance of both implementations with respect to the overall execution time, CPU and memory utilization. Furthermore, we will develop the corresponding multi-threading versions to explore how the memory is utilized when multiple cores access data from shared cache memory. The results of the empirical evaluation show that the code sections that use DOD perform significantly faster than the corresponding parts implemented using OOD for both single-threaded and multi-threaded applications. The maximum observed speedup of 13.25 times demonstrates that games and applications developed using DOD can utilize the available resources more efficiently.","PeriodicalId":200252,"journal":{"name":"2022 IEEE Games, Entertainment, Media Conference (GEM)","volume":"35 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-11-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE Games, Entertainment, Media Conference (GEM)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/GEM56474.2022.10017610","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The frame rate of a game is important for both the end-user and the developer, and for a game to be considered playable, the minimum requirement of 60 FPS should be main-tained. With respect to the programming design pattern, the current industry standard is to use Object-Oriented Design (OOD). While the demand for efficient game applications is increasing, applications developed using OOD are struggling to efficiently utilize the available computing resources and consequently meet the minimum frame-rate requirements. A design pattern that may be able to cope with the current and future requirements of resource-intensive game applications is the Data-Oriented Design (DOD), which focuses on the efficient CPU memory utilization. The main difference between OOD and DOD is related to the way data is organized and accessed. While DOD is able to efficiently utilize the cache memory, programming using the data-oriented design is perceived as much more complex compared to proagamming applications using object-oriented design. In this paper, we will first develop a simple game application using both programming design patterns. Thereafter, we evaluate the performance of both implementations with respect to the overall execution time, CPU and memory utilization. Furthermore, we will develop the corresponding multi-threading versions to explore how the memory is utilized when multiple cores access data from shared cache memory. The results of the empirical evaluation show that the code sections that use DOD perform significantly faster than the corresponding parts implemented using OOD for both single-threaded and multi-threaded applications. The maximum observed speedup of 13.25 times demonstrates that games and applications developed using DOD can utilize the available resources more efficiently.
基于多线程的面向对象和面向数据设计在游戏开发中的性能评估
游戏的帧率对于终端用户和开发者来说都很重要,要想让游戏具有可玩性,就应该保持60帧/秒的最低要求。关于编程设计模式,当前的行业标准是使用面向对象设计(OOD)。虽然对高效游戏应用程序的需求正在增加,但使用OOD开发的应用程序正在努力有效地利用可用的计算资源,从而满足最低帧率要求。面向数据设计(Data-Oriented design, DOD)是一种能够应对当前和未来资源密集型游戏应用需求的设计模式,它关注的是高效的CPU内存利用率。OOD和DOD的主要区别在于数据的组织和访问方式。虽然DOD能够有效地利用缓存,但与使用面向对象设计的编程应用程序相比,使用面向数据设计的编程被认为要复杂得多。在本文中,我们将首先使用这两种编程设计模式开发一个简单的游戏应用程序。之后,我们根据总体执行时间、CPU和内存利用率来评估这两种实现的性能。此外,我们将开发相应的多线程版本,以探索当多个内核从共享缓存访问数据时如何利用内存。实证评估的结果表明,对于单线程和多线程应用程序,使用DOD的代码段的执行速度明显快于使用OOD实现的相应部分。观察到的最大加速速度为13.25倍,表明使用DOD开发的游戏和应用程序可以更有效地利用可用资源。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信