Java Reference
In-Depth Information
chapter
5
algorithm analysis
I n Part One we examined how object-oriented programming can help in the
design and implementation of large systems. We did not examine perfor-
mance issues. Generally, we use a computer because we need to process a
large amount of data. When we run a program on large amounts of input, we
must be certain that the program terminates within a reasonable amount of
time. Although the amount of running time is somewhat dependent on the
programming language we use, and to a smaller extent the methodology we
use (such as procedural versus object-oriented), often those factors are
unchangeable constants of the design. Even so, the running time is most
strongly correlated with the choice of algorithms.
An algorithm is a clearly specified set of instructions the computer will
follow to solve a problem. Once an algorithm is given for a problem and
determined to be correct, the next step is to determine the amount of
resources, such as time and space, that the algorithm will require. This step is
called algorithm analysis . An algorithm that requires several hundred
gigabytes of main memory is not useful for most current machines, even if it
is completely correct.
 
Search WWH ::




Custom Search