Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!cwruecmp!hal!ncoast!btb From: btb@ncoast.UUCP Newsgroups: comp.lang.misc Subject: better ratfor ? Message-ID: <1707@ncoast.UUCP> Date: Tue, 18-Nov-86 13:48:46 EST Article-I.D.: ncoast.1707 Posted: Tue Nov 18 13:48:46 1986 Date-Received: Wed, 19-Nov-86 09:05:35 EST Reply-To: btb@ncoast.UUCP (Brad Banko) Distribution: comp.org.decus Organization: North Coast Public Access UN*X, Cleveland, OH Lines: 39 Keywords: ratfor, fortran, optimize Summary: ratfor preprocessor produces bad fortran code? 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) rather than into the much more efficient: i = 1 if (i .gt. n) goto (end of loop) ... i = i + 1 (etc.) 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) 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? Thanks, -- Brad Banko ...!decvax!cwruecmp!ncoast!btb Cleveland, Ohio