A Novel Dynamically Truncating Object Pool for Game Loops and Other Use Cases in Rust

dc.contributor.authorSaukko, Frans
dc.contributor.departmentfi=Tietotekniikan laitos|en=Department of Computing|
dc.contributor.facultyfi=Teknillinen tiedekunta|en=Faculty of Technology|
dc.contributor.studysubjectfi=Tietojenkäsittelytieteet|en=Computer Science|
dc.date.accessioned2025-03-17T22:05:45Z
dc.date.available2025-03-17T22:05:45Z
dc.date.issued2025-02-26
dc.description.abstractRust programming language, introduced in 2012, presents a new model of memory management called ownership: each value has an exclusive owner, and values are automatically destroyed when their owner leaves the scope. As adherence to ownership rules is checked during compile-time static analysis, runtime memory safety is guaranteed without sacrificing performance to garbage collection. However, the strict rules of ownership and the rigid memory hierarchy they introduce complicate certain things. Cross-iteration – comparing every element in a collection to every other element in the same collection, possibly mutating their data in the process – is not trivial to implement in Rust. This limitation has made implementing video game loops in Rust generally a complex and difficult task. This thesis presents a novel collection type, StableList, a simple-to-use and efficient data structure that supports mutable cross-iteration and dynamic truncation, implemented in safe Rust. This thesis introduces its public interface, explains its internal workings, and analyzes its performance against other Rust collections with similar features and purpose through collected benchmark data. As the research data shows, StableList is at least mediocre in its running time for all the essential operations, in the superior subgrouping for cases with highly varying numbers of short-lived elements, and unrivaled for mutable cross-iteration. StableList is a potent data structure for its purpose of powering video game loops and is highly viable for many other use cases, including worker, thread and connection pools.
dc.format.extent85
dc.identifier.olddbid197223
dc.identifier.oldhandle10024/180264
dc.identifier.urihttps://www.utupub.fi/handle/11111/19790
dc.identifier.urnURN:NBN:fi-fe2025031718549
dc.language.isoeng
dc.rightsfi=Julkaisu on tekijänoikeussäännösten alainen. Teosta voi lukea ja tulostaa henkilökohtaista käyttöä varten. Käyttö kaupallisiin tarkoituksiin on kielletty.|en=This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.|
dc.rights.accessrightsavoin
dc.source.identifierhttps://www.utupub.fi/handle/10024/180264
dc.subjectRust, safe Rust, data structure, algorithm, collection, object pool, pool, arena, video game, game engine, game loop, iteration, cross-iteration, truncation, RAII
dc.titleA Novel Dynamically Truncating Object Pool for Game Loops and Other Use Cases in Rust
dc.type.ontasotfi=Pro gradu -tutkielma|en=Master's thesis|

Tiedostot

Näytetään 1 - 1 / 1
Ladataan...
Name:
Saukko_Frans_opinnayte.pdf
Size:
1.4 MB
Format:
Adobe Portable Document Format