Quick Access - Optimizing AOT Compiled Dynamic Programming Languages
Publicerad
Författare
Typ
Examensarbete för masterexamen
Master's Thesis
Master's Thesis
Modellbyggare
Tidskriftstitel
ISSN
Volymtitel
Utgivare
Sammanfattning
Research on dynamic programming languages typically focus on just-in-time (JIT) compilation. However, JIT techniques are not always viable due to hardware limitations or security concerns, making it valuable to study ahead-of-time (AOT) compilation of dynamic languages as well. The GameMaker game engine targets mobile devices, game consoles, and WebAssembly — all platforms poorly suited for JIT compilation. Instead, GameMaker supports AOT compilation of JavaScript and its own language, GameMaker Language. In this thesis, we extend the engine with new profiling tools to analyze the memory usage and runtime performance of property accesses, a frequent and performance-critical operation in dynamic languages. Using our new tools, we identify several opportunities for improvement in both the compiler and runtime environment. Finally, we propose and implement solutions to the identified areas of improvement. These include polymorphic property caches, a pipeline for profile-guided optimizations, caching of accessor properties, and cache pools designed to facilitate cache invalidation. In certain benchmarks, our solutions achieve speedups with factors ranging from 1.5 to 2.9.
Beskrivning
Ämne/nyckelord
Ahead-of-time compilation, Hidden class, Property cache
