Sujet : Re: The joy of FORTRAN
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 29. Sep 2024, 06:36:03
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vdap03$1kp35$3@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Pan/0.160 (Toresk; )
On Sun, 29 Sep 2024 04:26:10 GMT, Charlie Gibbs wrote:
On 2024-09-27, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On Fri, 27 Sep 2024 20:38:38 GMT, Charlie Gibbs wrote:
>
I was once called in to optimize a CPU-bound COBOL program.
The genius who wrote it declared all subscripts as COMP-3. Changing
them to COMP-4 knocked 30% off the execution time.
>
Did you just change
>
DEFINE TYPE COMP AS COMP-3
>
to
>
DEFINE TYPE COMP as COMP-4
>
and that would take effect everywhere that COMP was used?
>
Oh, wait, COBOL didn’t have typedefs ...
I suppose I could have done the equivalent of s/COMP-3/COMP-4/ in the
text editor of the day, but that would have also changed the fields that
were not only legitimately COMP-3, but which could not have been held in
a COMP-4 variable.
Sometimes you just gotta Do the Right Thing, no matter how long it
takes.
Helps if you are charging by the hour. ;)