1. A method to control a lock of an object, comprising: intercepting a processor request to apply the lock on the object; identifying 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 is below a threshold value, generating a lock bypass for the object to cause speculative execution of target code within the object; and preventing speculative execution by applying the lock on the object when the number of instances is above the threshold value.