Apparatuses, methods, and computer program products for reducing software runtime
AssigneeInternational Business Machines Corporation
InventorsJohn J. Auvenshine, Anthony J. Ciaravella, John T. Olson, Richard A. Welp
Life of this patent
Estimating the term…
Abstract
An apparatus, method, system, and program product are disclosed for reducing software runtime. One method includes determining a result produced in response to executing code. The method also includes storing the result. The method includes receiving a request to execute the code. The method also includes, without executing the code, providing the result in response to receiving the request to execute the code.
Claims11
An apparatus comprising:
- a result determination module that determines a result produced in response to executing code via a function call;
- a storage module that stores the result;
- a request reception module that receives a request to execute the code;
- a bypass module that, without executing the code, provides the result in response to receiving the request to execute the code;
- an analysis module that analyzes functional behavior of the code during execution to determine whether to store the result, wherein the functional behavior comprises an execution time, a result variance, a result history, or some combination thereof, and wherein the analysis module:
- determines whether the execution time of the code exceeds a predetermined time threshold;
- in response to the execution time of the code exceeding the predetermined threshold, determines whether the result history indicates that a result size is less than a predetermined size threshold;
- in response to the result size being less than the predetermined size threshold, determines whether the result variance indicates that results of executing the code are unlikely to change for a given set of inputs;
- and
- stores the result in response to the result variance indicating that the results of executing the code are unlike to change for the given set of inputs;
- and
- a function call module having a function call that requests to execute the code, wherein the function call comprises one or more arguments;
- wherein at least a portion of the result determination module, the storage module, the request reception module, and the bypass module comprises one or more of hardware and executable code, the executable code being stored on one or more non-transitory computer readable storage media.
A method for reducing software runtime, comprising:
- determining a result produced in response to executing code via a function call;
- storing the result;
- receiving a request to execute the code in response to the function call, wherein the function call comprises one or more arguments;
- without executing the code, providing the result in response to receiving the request to execute the code;
- and
- analyzing functional behavior of the code during execution to determine whether to store the result, wherein the functional behavior comprises an execution time, a result variance, a result history, or some combination thereof, wherein analyzing the functional behavior comprises:
- determining whether the execution time of the code exceeds a predetermined time threshold;
- in response to the execution time of the code exceeding the predetermined threshold, determining whether the result history indicates that a result size is less than a predetermined size threshold;
- in response to the result size being less than the predetermined size threshold, determining whether the result variance indicates that results of executing the code are unlikely to change for a given set of inputs;
- and
- storing the result in response to the result variance indicating that the results of executing the code are unlike to change for the given set of inputs.
A computer program product for reducing software runtime, the computer program product comprising a non-transitory computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to:
- determine a result produced in response to executing code via a function call;
- store the result;
- receive a request to execute the code in response to the function call, wherein the function call comprises one or more arguments;
- without executing the code, provide the result in response to receiving the request to execute the code;
- and
- analyze functional behavior of the code during execution to determine whether to store the result, wherein the functional behavior comprises an execution time, a result variance, a result history, or some combination thereof, wherein analyzing the functional behavior comprises:
- determining whether the execution time of the code exceeds a predetermined time threshold;
- in response to the execution time of the code exceeding the predetermined threshold, determining whether the result history indicates that a result size is less than a predetermined size threshold;
- in response to the result size being less than the predetermined size threshold, determining whether the result variance indicates that results of executing the code are unlikely to change for a given set of inputs;
- and
- storing the result in response to the result variance indicating that the results of executing the code are unlike to change for the given set of inputs.
Dependencies are inferred from the claim text.