# US 11,307,883 B2 · Optimization of the execution time of a computer program by determining the implementation of a function according to range of input parameters and accuracy

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,307,883 B2
- Document ID: US11307883B2
- Status: Granted
- Kind: B2
- Application number: 16/205,227
- Filed: 2018-11-30
- Published: 2019-05-30
- Granted: 2022-04-19
- Earliest claimed: 2017-11-30
- Assignees: Bull SAS
- Applicants: Bull SAS
- Inventors: Romain Dolbeau; David Guibert
- Web page: https://patentgrep.com/patent/US11307883B2

## CPC

- G06F 9/45525: {Optimisation or modification within the same instruction set architecture, e.g. HP Dynamo}
- G06F 8/4441: {Reducing the execution time required by the program code}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

This invention relates to a method of optimization of a computer program, comprising: a first step (S11, S12, S13, S14) of determination of a call of a function having at least one input parameter, said call corresponding to a first criterion according to which said input parameter is inside an interval substantially smaller than the range of possible values for said input parameter, and to a second criterion corresponding to a desired accuracy for said call; a second step (S2) of automatic generation of an executable code for implementing said function, minimizing execution time for said input parameter being within said interval and compliant with said desired accuracy; a third step (S3) of replacing the existing code implementing said function by the executable code generated at said second step.

## Claims

### Claim 1

Method of optimization of a computer program, comprising:
determining within said computer program a call in runtime of a function having at least one input parameter, said call corresponding to a first criterion according to which said at least one input parameter is inside an interval smaller than the range of possible values for said input parameter, said interval being formed by sample values stored for several executions of said program, and to a second criterion corresponding to a desired accuracy for said call;
automatically generating an executable code for implementing said function, minimizing execution time for said at least one input parameter being within said interval and compliant with said desired accuracy, by choosing an implementation according to said interval and said desired accuracy and by determining parameters of said implementation according to said desired accuracy;
replacing an existing execution code implementing said function by the executable code generated by the automatically generating of the executable code.

### Claim 2 (depends on 1)

Method according to claim 1; wherein determining within said computer program comprises the automatic triggering of a set of executions for said computer program and the automatic analysis of said execution for measuring for each of said calls the value of said at least one parameter so as to determine said interval.

### Claim 3 (depends on 1)

Method according to claim 1, wherein said desired accuracy is determined at least partly on the basis of the environment of said call within said computer program.

### Claim 4 (depends on 1)

Method according to claim 1, wherein automatically generating the executable code comprises generating code expressions, each associated to a term of a mathematical suite approximating said function, wherein the number of said code expressions is determined by said desired accuracy.

### Claim 5 (depends on 1)

Method according to claim 1, wherein said function is a trigonometric function.

### Claim 6 (depends on 5)

Method according to claim 5, wherein automatically generating the executable code consists in generating a first execution code based on Taylor series, or a second execution code based Chebyshev polynomials.

### Claim 7 (depends on 6)

Method according to claim 6, wherein automatically generating the executable code consists in generating said first execution code based on Taylor series if said interval is close to zero, and said second execution code based on Chebyshev polynomials otherwise.

### Claim 8

A platform for the optimization of a computer program, comprising:
a computer, wherein the computer is configured to execute one or more programs comprising:
a second computer program configured to determine within said computer program of a call of a function in runtime having at least one input parameter, said call corresponding to a first criterion according to which said at least one input parameter is inside an interval smaller than the range of possible values for said input parameter, said interval being formed by sample values stored for several executions of said program, and to a second criterion corresponding to a desired accuracy for said call;
a computer program configured to automatically generate an executable code for implementing said function, minimizing execution time for said at least one input parameter being within said interval and compliant with said desired accuracy, by choosing an implementation according to said interval and said desired accuracy and by determining parameters of said implementation according to said desired accuracy, and the replacement of an existing execution code implementing said function by the executable code generated at said second step.

### Claim 9 (depends on 8)

Platform according to claim 8, wherein said means are the second computer program adapted for the automatic determination of said call.

### Claim 10 (depends on 8)

Platform according to claim 8, wherein said computer program comprises instructions to generate code expressions, each associated to a term of a mathematical suite approximating said function, wherein the number of said code expressions is determined by said desired accuracy.
