Apparatus and method for using database knowledge to optimize a computer program
AssigneeInternational Business Machines Corporation
InventorsEric Lawrence Barsness, Richard Dean Dettinger, John Matthew Santosuosso
Life of this patent
Estimating the term…
Abstract
A code optimizer is used to optimize a computer program that references a database by determining the characteristics of the database and making suitable optimizations based on the characteristics of the database. By taking into account the characteristics of a database referenced in the computer program, the optimizer may make suitable optimizations to the computer program. Such optimizations include, without limitation, removing unnecessary calls to the database, removing unnecessary loops, removing unnecessary database operations, providing compile-time errors, and replacing dynamic calls with static data.
Claims39
An apparatus comprising:
- at least one processor;
- a memory coupled to the at least one processor;
- a first instruction stream residing in the memory;
- and
- a code optimization mechanism residing in the memory and executed by the at least one processor, the code optimization mechanism optimizing the first instruction stream to generate therefrom a second instruction stream according to characteristics of a database referenced in the first instruction stream.
An apparatus comprising:
- at least one processor;
- a memory coupled to the at least one processor;
- a first instruction stream residing in the memory;
- a code optimization mechanism residing in the memory and executed by the at least one processor, the code optimization mechanism querying a database referenced in the first instruction stream to determine characteristics of the database, the code optimization mechanism optimizing the first instruction stream to generate therefrom a second instruction stream according to the characteristics of the database, the code optimization mechanism deleting at least one unnecessary call to the database in the first instruction stream, the code optimization mechanism removing at least one loop from the first instruction stream that is unnecessary as determined by the characteristics of the database, the code optimization mechanism removing at least one unnecessary database operation from the first instruction stream, the code optimization mechanism replacing at least one dynamic call in the first instruction stream with static data.
A method for optimizing a first instruction stream comprising the steps of:
- (A) determining characteristics of a database referenced in the first instruction stream;
- and
- (B) optimizing the first instruction stream to generate therefrom a second instruction stream according to the characteristics of the database.
A method for optimizing a first instruction stream comprising the steps of:
- (A) querying a database referenced in the first instruction stream to determine characteristics of the database;
- (B) deleting at least one unnecessary call to the database in the first instruction stream;
- (C) removing at least one loop from the first instruction stream that is unnecessary as determined by the characteristics of the database;
- (D) removing at least one unnecessary database operation from the first instruction stream;
- and
- (E) replacing at least one dynamic call in the first instruction stream with static data.
A program product comprising:
- (A) a code optimization mechanism that optimizes a first instruction stream to generate therefrom a second instruction stream according to characteristics of a database referenced in the first instruction stream;
- and
- (B) computer-readable signal bearing media bearing the code optimization mechanism.
Dependencies are inferred from the claim text.