1. A computer-implemented method for optimizing cache efficiency, comprising the steps of: receiving a set of configuration parameters, the configuration parameters comprising optimization parameters; locating a set of functions to be optimized in an application; generating one or more ordering permutations of the functions for placement in a cache memory; rejecting permutations of the one or more ordering permutations that do not satisfy the optimization parameters; and selecting a permutation from the one or more ordering permutations, wherein the selected permutation satisfies the optimization parameters to a greater degree than the remaining one or more ordering permutations, wherein the optimization parameters comprise a parameter indicating the maximum acceptable limit for hits per line in the cache and a parameter indicating the maximum acceptable limit for the number of cache lines which are at the maximum acceptable limit for hits per line in the cache.