Computing performance for execution of functions called by function handles
AssigneeThe MathWorks, Inc.
InventorsRajeshwar Vanka, Ayon Basumallik, Brett Baker
Life of this patent
Estimating the term…
Abstract
Extended types are defined for functions that are called by function handles in a programming environment. The extended types can be accessed and used by a computing system to improve compile-time and run-time performance of the computing system.
Claims18
A computer-implemented method to improve execution of functions called by handles in a programming environment, the method comprising:
- receiving first information that defines a first function for executing in the programming environment, wherein the first information includes a first function handle for the first function and information about one or more features of the first function, and wherein the information about the one or more features comprises a number of visible values for the first function that are defined for the first function in the programming environment and used by the first function during execution of the first function;
- defining a first extended type for the first function based on information about at least one of the one or more features of the first function;
- generating a first function handle object for the first function, wherein the first function handle object includes identifying information that identifies the first function and information about the at least one of the one or more features of the first function;
- at compile time for execution of the first function, identifying from the first function handle object that the first function handle is associated with the first extended type;
- at compile time, compiling executable code for the first function based at least in part on information identified from the first extended type;
- compiling associated code to assist in execution of the first function;
- at compile time, identifying the associated code based on the first extended type for executing with the executable code during run-time of the first function;
- in response to a subsequent call of the first function, performing acts of:
- at compile time, determining that the first function handle object generated for the first function is associated with the first extended type;
- and
- choosing the associated code for execution of the first function based on determining that the first function handle object is associated with the first extended type;
- and
- at run-time, executing the associated code and the executable code for the first function.
A system comprising at least one processor that supports a programming environment, wherein the at least one processor is adapted to:
- receive first information that defines a first function for executing in the programming environment, wherein the first information includes a first function handle for the first function and information about one or more features of the first function, and wherein the information about the one or more features comprises a number of visible values for the first function that are defined for the first function in the programming environment and used by the first function during execution of the first function;
- define a first extended type for the first function based on information about at least one of the one or more features of the first function;
- generate a first function handle object for the first function, wherein the first function handle object includes identifying information that identifies the first function and information about the at least one of the one or more features of the first function;
- at compile time for execution of the first function, identify from the first function handle object that the first function handle is associated with the first extended type;
- at compile time, compile the executable code for the first function based at least in part on information identified from the first extended type;
- compiling associated code to assist in execution of the first function;
- at compile time, identifying the associated code based on the first extended type for executing with the executable code during run-time of the first function;
- in response to a subsequent call of the first function, performing acts of:
- at compile time, determining that the first function handle object generated for the first function is associated with the first extended type;
- and
- choosing the associated code for execution of the first function based on determining that the first function handle object is associated with the first extended type;
- and
- at run-time, execute the associated code and the executable code for the first function.
A non-transitory computer-readable medium encoding instructions that, when executed by one or more processors, adapt the one or more processors to execute acts that improve execution of functions called by handles in a programming environment, the acts comprising:
- receiving first information that defines a first function for executing in the programming environment, wherein the first information includes a first function handle for the first function and information about one or more features of the first function, and wherein the information about the one or more features comprises a number of visible values for the first function that are defined for the first function in the programming environment and used by the first function during execution of the first function;
- defining a first extended type for the first function based on information about at least one of the one or more features of the first function;
- generating a first function handle object for the first function, wherein the first function handle object includes identifying information that identifies the first function and information about the at least one of the one or more features of the first function;
- at compile time for execution of the first function, identifying from the first function handle object that the first function handle is associated with the first extended type;
- at compile time, compiling executable code for the first function based at least in part on information identified from the first extended type;
- compiling associated code to assist in execution of the first function;
- at compile time, identifying the associated code based on the first extended type for executing with the executable code during run-time of the first function;
- in response to a subsequent call of the first function, performing acts of:
- at compile time, determining that the first function handle object generated for the first function is associated with the first extended type;
- and
- choosing the associated code for execution of the first function based on determining that the first function handle object is associated with the first extended type;
- and
- at run-time, executing the associated code and the executable code for the first function.
Dependencies are inferred from the claim text.