Download CD Content
To make a Java game that has optimal performance, it is vital to understand some of the inner workings of the Java virtual machine (VM). The topics discussed in this chapter help you to understand how the Java VM (JVM) works so that you can get the most out of it for your games. The majority of this chapter focuses on the inner workings of the VM, which includes topics such as the optimizations performed by the HotSpot VM and the garbage collector (GC). A specific section of this chapter discusses benchmarking and profiling of a Java program. This chapter also has a dedicated performance tips section that offers numerous general game-programming performance tips as well as Java-specific performance tips.