🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.org.decus
Article #630

better ratfor ?

#630
From: Brad Banko
Date: Thu, 20 Nov 1986 18:00
50 lines
2389 bytes
Hello,
	Does anybody know of a good ratfor preprocessor... one that doesn't
have some of the problems that our 3 have.... one that knows about f77?
	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)

this may not seem like much, but I have benchmarked the above optimization
change against the original code from a ratfor version of sieve, and it 
makes a factor of 2 difference... who knows how much more could be improved?
(Incidentally, the ratfor fortran sieve ran 5 times slower than either the
f77, or C sieve, so in other words, a ratfor preprocessor that knows about
f77 could translate ratfor whiles and fors into f77 do whiles and dos... 
resulting in much quicker code.)

	We have a huge programming system all written in rat4... (Gipsy
image processing software), running on a lil' 11/750... 

	If you know of a "modern" rat4 we could get our hands on, I would
appreciate it...  I would also appreciate it if someone could tell me if
the above code is necessary in some way that I am not thinking of?

	Also, if you, or someone you know has any experience with the
Gipsy (General Image Processing System) software originally developed at
Virginia Polytechnic Institute, please send me email... this package was
originally developed to run on IBM systems, but has been ported (sort of)
to VMS...  We need help!

	Thanks,

-- 
			Brad Banko
			...!decvax!cwruecmp!ncoast!btb
			Cleveland, Ohio
Technical Details
Message-ID: <1724@ncoast.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!clyde!cbatt!cwruecmp!hal!ncoast!btb

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!clyde!cbatt!cwruecmp!hal!ncoast!btb
From: btb@ncoast.UUCP (Brad Banko)
Newsgroups: comp.org.decus,comp.lang.fortran,comp.lang.misc
Subject: better ratfor ?
Message-ID: <1724@ncoast.UUCP>
Date: Thu, 20-Nov-86 13:00:21 EST
Article-I.D.: ncoast.1724
Posted: Thu Nov 20 13:00:21 1986
Date-Received: Fri, 21-Nov-86 20:06:33 EST
Reply-To: btb@ncoast.UUCP (Brad Banko)
Distribution: comp.org.decus
Organization: North Coast Public Access UN*X, Cleveland, OH
Lines: 50
Keywords: ratfor, fortran, optimize, f77
Summary: ratfor preprocessor produces bad fortran code?