1. A method, comprising: in a computing device comprising at least one processor, a memory, and an operating system with a plurality of modes of execution, accessing instructions received by the computing device for compilation using at least one of the plurality of modes of execution, wherein the plurality of modes of execution utilize a different level of code optimization during compilation and a quality of compiled code increases using modes of execution with increasing optimization levels, and the instructions comprising a plurality of subroutines; generating a fingerprint for each of the plurality of subroutines, wherein the fingerprint identifies a plurality of performance scores associated with the plurality of modes of execution of a subroutine on the computing device for corresponding quality of compiled code using the plurality of modes of execution; determining, for each of the plurality of subroutines and based on the fingerprint, performance score and estimated compilation time associated with each of the plurality of modes of execution, for compiling the corresponding one of the plurality of subroutines, wherein the estimated compilation time depends on hardware characteristics of the computing device as well as a number of the plurality of subroutines in the instructions and the level of code optimization for the mode of execution; and selecting one of the plurality of modes of execution for compiling each of the plurality of subroutines, based on: maximizing a total performance score for the plurality of subroutines; and limiting a total compilation time of the plurality of subroutines to remain within a determined period of time.