Thread View: comp.lang.misc
2 messages
2 total messages
Started by btb
Tue, 18 Nov 1986 18:48
better ratfor ?
Author: btb
Date: Tue, 18 Nov 1986 18:48
Date: Tue, 18 Nov 1986 18:48
39 lines
1806 bytes
1806 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) 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
Re: better ratfor ?
Author: Random
Date: Thu, 20 Nov 1986 14:01
Date: Thu, 20 Nov 1986 14:01
13 lines
1135 bytes
1135 bytes
At a place I used to work, we had some ratfor programs. A guy there modified the RatFor preprocessor (compiler) to detect the special case loop of for (i=x; i<y; i=i+z) This was converted in a VMS FORTRAN do loop instead of if's and goto's. This allowed the fortran compiler to detect that a loop was present and kick in loop optimizing code. I don't remember the numbers, but the improvement was significant. -- Random (Randy Buckland) Research Triangle Institute ...!mcnc!rti-sel!rcb
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads