1. A computer including a simulator operable to execute a set of simulator instructions simulated by a plurality of service routines, the computer being configured to execute computer-executable instructions stored on a computer-readable medium for performing the steps of: executing a plurality of service routines; monitoring a frequency of execution of each of the plurality of service routines; generating a plurality of functions, each function including a plurality of the service routines selected based on the frequency of execution of each service routine; and modifying at least one service routine included in at least one generated function based on execution of the at least one service routine, to be included in a second generated function based on a change in the frequency of execution of the at least one service routine; wherein the step of monitoring the frequency of execution of each service routine includes collecting and recording statistics on the frequency of execution of each service routine; and updating the grouping of each of the service routines in each of the plurality of functions during execution of the service routine.