Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: docdwarf@xxxxxxxxx
- Date: 20 Jul 2005 21:26:48 -0400
In article <3k86utFl4gssU1@xxxxxxxxxxxxxx>,
Pete Dashwood <dashwood@xxxxxxxxxxxxxx> wrote:
[snip]
>Given identical functionality and identical residence, the smaller the code
>is, the quicker it will execute. Invariably.
'Identical residence'? I'm not sure what this represents, Mr Dashwood,
but I'd take exception with your assertion that 'less code = faster
execution' because it appears to ignore differences in the amount of time
it takes to execute different instructions.
I recall, years ago, talking with a Geezer who said that the first
airline reservations system he worked on used only register-to-register
(RR) instructions because they were so fast... in general they found that
rewriting other single instructions as multiple RR instructions still gave
them an overall drop in execution time (commonly known as 'faster code').
Consider the following example.
Using the IBM mainframe platform and every compiler I'm familiar with
since IKFCBL00: given:
05 FLDA PIC X.
05 FLDB PIC X.
then MOVE FLDA TO FLDB will compile to an MVI, IF FLDA = FLDB will compile
to a CLI. Given:
05 FLDA PIC X(n).
05 FLDB PIC X(n).
.... where n is an integer > 1 then MOVE FLDA TO FLDB will compile to an
MVC, IF FLDA = FLDB will compile to a CLC.
As I was taught, lo, those many years ago - and I do not know if this is
still valid for COBOL under modern conditions - an MVI executes
approximately three times faster than an MVC and a CLI thrice faster than
a CLC. It can be readily postulated that code can be written which is
greater in volume of instructions ('larger') than other code ('smaller')
and yet will execute more rapidly due to faster constructs being employed.
DD
.
- Follow-Ups:
- Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: Pete Dashwood
- Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: William M. Klein
- Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- References:
- Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: Oliver Wong
- Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: Pete Dashwood
- Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: Clark Morris
- Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- From: Pete Dashwood
- Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- Prev by Date: Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- Next by Date: Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- Previous by thread: Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- Next by thread: Re: Is it always possible to write a COBOL program using only 1 sentence per paragraph?
- Index(es):
Relevant Pages
|