🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #4653

Re: better ratfor ?

#4653
From: Joseph P. Larson
Date: Tue, 02 Dec 1986 14:51
30 lines
2102 bytes
In article <1768@ncoast.UUCP> btb@ncoast.UUCP (Brad Banko) writes:
>...
>	(	if (.not. (a.le.n) ) ..., should go to:
>		if ( a.gt.n ) ...	),
>
>	I don't know much about compilers.  Our Fortran compiler is
>Vax Fortran ...
>second, if the ratfor ( if (.not. (a.le.n))...) is hand optimized to
>( if (a.gt.n) ...) the resulting executable file runs twice as fast.


Hmm.  I've looked at the code VAX/VMS FORTRAN produces in the past.
The optimization always struck me as being very good.  Is this the
FORTRAN you are using, or do you use UNIX/Eunice?  Also, I assume
that either you are doing more hand-optimizations than just this
one line, or this is almost your entire routine in order for there
to be a difference-factor of 2 for this trivial change.  Could you be
so nice as to send us (or at least me) the Macro-11 the code produces?
I'm curious.  (In VAX/VMS FORTRAN, I think you want the /MACH option.
Don't do a /FULL list or anything like that).

Of course, it could be possible you've stumbled across just the right
combination of boolean operators to negate the compiler's ability to
optimize, at which point DEC would probably love to receive a fairly
detailed description....
-- 
UUCP: ihnp4!rosevax!dayton!joe          Joe Larson
ATT : (612) 375-3537                    Dayton Hudson Department Store Company
(standard disclaimer...)                700 on the Mall
                                        Mpls, Mn. 55408
Technical Details
Message-ID: <235@dayton.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!dayton!joe
References: <1724@ncoast.UUCP> <5401@brl-smoke.ARPA> <1355@ttrdc.UUCP> <1768@ncoast.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!dayton!joe
From: joe@dayton.UUCP (Joseph P. Larson)
Newsgroups: comp.lang.fortran
Subject: Re: better ratfor ?
Message-ID: <235@dayton.UUCP>
Date: Tue, 2-Dec-86 09:51:19 EST
Article-I.D.: dayton.235
Posted: Tue Dec  2 09:51:19 1986
Date-Received: Tue, 2-Dec-86 22:42:57 EST
References: <1724@ncoast.UUCP> <5401@brl-smoke.ARPA> <1355@ttrdc.UUCP> <1768@ncoast.UUCP>
Reply-To: joe@dayton.UUCP (Joseph P. Larson)
Distribution: comp.org.decus
Organization: Dayton-Hudson Dept. Store Co.
Lines: 30
Keywords: ratfor, fortran, optimize, f77