1. A method for loading processor-optimized library modules into virtual machines, the method comprising: detecting a first library module loaded into a virtual machine (VM) to be executed on a first processor; determining a processor characteristic associated with the first processor; selecting a second library module based on the first library module and the determined processor characteristic; loading the second library module into the VM to replace the first library module; determining whether any processes of the VM are using the first library module; and in response to determining that one or more processes of the VM are using the first library module, waiting for the one or more processes to complete before loading the second library module into the VM to replace the first library module.