A method and computer-readable medium perform a pre-boot scan of an
emulated binary to detect a function that is above a predetermined
complexity threshold. The detected function may then be precompiled
during a boot-up process. The pre-boot scan may also detect a function
that falls below a second predetermined complexity threshold. The
detected function may be placed inline with the code body. Just-in-time
translation may then be performed at runtime.