🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.org.decus
Article #629

Re: better ratfor ?

#629
From: Ben Cranston
Date: Mon, 24 Nov 1986 05:16
26 lines
1443 bytes
In article <1724@ncoast.UUCP> btb@ncoast.UUCP (Brad Banko) writes:
> As an example, the ratfor for loop:
>  for (i=1; i<=n; i = i + 1)
>translates into the horrible:

>		i = 1
>		if (.not. (i .le. n)) goto (end of loop)
>		...
>		i = i + 1 (goto if)
>		(end of loop)

> rather than into the much more efficient:

>		i = 1
>		if (i .gt. n) goto (end of loop)
>		...
>		i = i + 1 (etc.)
>		(end of loop)

Gosh, any Fortran compiler that doesn't produce the same or similar code
for these two cases sure seems suspect - are you sure there isn't an
"optimize" switch that you could invoke?
-- 
                    umd5.UUCP    <= {seismo!umcp-cs,ihnp4!rlgvax}!cvl!umd5!zben
Ben Cranston zben @ umd2.UMD.EDU    Kingdom of Merryland Sperrows 1100/92
                    umd2.BITNET     "via HASP with RSCS"
Technical Details
Message-ID: <1374@umd5>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mimsy!cvl!umd5!zben
References: <1724@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!mimsy!cvl!umd5!zben
From: zben@umd5 (Ben Cranston)
Newsgroups: comp.org.decus,comp.lang.fortran,comp.lang.misc
Subject: Re: better ratfor ?
Message-ID: <1374@umd5>
Date: Mon, 24-Nov-86 00:16:45 EST
Article-I.D.: umd5.1374
Posted: Mon Nov 24 00:16:45 1986
Date-Received: Mon, 24-Nov-86 21:11:27 EST
References: <1724@ncoast.UUCP>
Reply-To: zben@umd5.umd.edu (Ben Cranston)
Organization: University of Maryland, College Park
Lines: 26
Keywords: ratfor, fortran, optimize, f77
Summary: Why not add optimization to f77...