|
General Game Programming: Optimizations
Utilizing Multicore Processors with OpenMP |
Closest-String Matching Algorithm |
Writing a Fast, Efficient, Fixed-Size Object Allocator |
Optimized Script Execution |
Abstract: The slow speed with which script languages are executed (compared to native code) places many limitations on a script language's potential applications. Previously only infrequently executed code placed outside of the game's inner loops has been deemed suitable for scripting, and for this reason script languages have typically only been used for story telling or customizable event-handling purposes.
Using optimization techniques presented in this article, it possible to increase script execution efficiency to near-native performance levels, enabling the use of scripting in the game's core logic, or even in a high performance 3D rendering system. The flexibility gained from switching to script-based logic means that even modifying a program's innermost mechanics is trivial, and does not come with the performance penalties one would expect.
Three stages of script execution are individually examined, and optimizations for each are presented. The techniques and principles presented can be easily applied to any existing scripting engine.
Optimization for C++ Games |
Fast Math Using Template Metaprogramming |
|
|
|