1. A method to control a lock of an object, comprising: intercepting, by executing an instruction with a processor, a request to apply the lock on the object; identifying, by executing an instruction with the processor, a performance history of the object based on a number of instances of contention; reducing computing resources of the processor by, when the number of instances satisfies a threshold: generating, by executing an instruction with the processor, a lock bypass for the object to cause speculative execution of target code within the object; and reducing, by executing an instruction with the processor, an execution time of the speculative execution by diverting the speculative execution of the target code from a managed runtime environment (MRE) to the processor; and preventing, by executing an instruction with the processor, speculative execution by applying the lock on the object when the number of instances does not satisfy the threshold.