IBM 1130 User Manual page 565

Computing system
Hide thumbs Also See for 1130:
Table of Contents

Advertisement

Section
Subsections
Page
70
50
I
01
01
FOHTHAN COHE SAVING TIPS
General
The way in which you code your FOH THAN programs
will have a considerable effect on their size. The
difference between efficient and inefficient coding
might be as much as several hundred words. This
may mean the difference between a program that
fits in core and one that doesn't, or the difference
between one that requires many time-consuming
overlays and one that requires none.
In
general, the larger a program, the more
slowly it will run--not because it does more, but
because of the overlays(SOCALs, LOCALs and
LINKs) required to fit it into core. When writing
your programs, therefore, you should make every
effort to keep them small.
One way to do this is
to know which FORTRAN techniques save core
storage, and which ones consume it excessively.
A better way is to design programs that do just one
job, rather than many.
(Subsection 25.30.20 con-
tains a discussion of the advantages of modular
programming.) Still another way is to use efficient
overlays (see Section 65).
The core storage requirements for any particular
program can be split into three major elements:
The object code generated by the compiler
The subroutines, which actually do the
work
The data area, where all variables and
constants are stored
You should realize that very little actual work
is done "in line" by your program; when the end-of-
compilation summary says your program size is
1000 words, it means that your program has been
translated into 1000 words of branches or linkages
to subroutines, plus some housekeeping to prepare
the linkages. The exception to this statement is
integer arithmetic, which is done in line, without
subroutines. However, all subscript calculation,
real arithmetic, and input/output is accomplished
by subroutines.
Some of the core saving tips in this section are
directed toward reducing the subroutine require-
ments, while others will reduce the amount of
in-line coding.
If you modify an existing program, incorporating
some of these tips, don't expect
to
find all the sav-
ings reflected in the end-of-compilation summary.
Check the list of required subroutines; you may
have eliminated some of them.

Advertisement

Table of Contents
loading

Table of Contents