1. An apparatus comprising: at least one processor; a memory coupled to the at least one processor; a computer program residing in the memory; and dynamic compilation logic residing in the memory and executed by the at least one processor, the dynamic compilation logic controlling the execution of the computer program and storing execution statistics for the computer program in a persistent store, the persistent store including execution statistics stored during at least one previous execution of the computer program, the dynamic compilation logic using the execution statistics in the persistent store to determine which portions of the computer program to dynamically compile as the computer program executes.