🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #2964

Re: 80-20

#2964
From: Barry Shein
Date: Sun, 12 Nov 1989 18:31
40 lines
2601 bytes
In article <6927@pt.cs.cmu.edu> lindsay@MATHOM.GANDALF.CS.CMU.EDU (Donald Lindsay) writes:
>If DEC would document exactly what's in that 80%, then VAX compiler
>writers could FINALLY settle the subject of choosing between
>different instruction sequences.

If you want a good feel for the 80% look at the code generated by
VAX/VMS Fortran. It uses far less than 80% of the instructions as far
as I can tell (perhaps more in rare cases, hmmm, what %age of the
instructions for what %age of generated code...)

Someone had given me some Fortran code a while back and asked me to
compare it under VMS/Fortran and Unix. The Unix Fortran we had was so
abysmal that we finally agreed that rewriting it into C was fair game
(since the interest was in precisely this algorithm being run, and
other smallish algorithms which could be rewritten if that was the
best way to do it.) Unix/C (4.2bsd) and VMS/Fortran (both Vax/780's)
were compared.

There was a few percent difference between the two, UNIX/C being
slower (but not by much, still curious.) I finally compared generated
code to see why. My conclusion was that the only difference is
VMS/Fortran's avoidance of the SOBGTR instruction on simple loops,
preferring instead a sequence like DEC, TST, BNE which apparently ran
faster. In fact, I concluded that the only thing worth optimizing in
this rather turgid code was the loop overhead, it had a lot of fancy
if-then-else's but actually didn't do much other than swap elements
around in a matrix (it was useful, but the looping overhead dominated
the 20 minutes it took to run on these systems, you could remove the
code in the loops and it made very little difference to the total run
time, I wonder how common that is in physics code?)

ANYHOW...sorry...it was an interesting exercise, go take a look at
generated VMS/Fortran code (it's very good) and you'll see immediately
the kind of things which are fast on a Vax.
-- 
        -Barry Shein

Software Tool & Die, Purveyors to the Trade         | bzs@world.std.com
1330 Beacon St, Brookline, MA 02146, (617) 739-0202 | {xylogics,uunet}world!bzs
Technical Details
Message-ID: <1989Nov12.183132.3120@world.std.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!think!husc6!spdcc!xylogics!world!bzs
References: <6927@pt.cs.cmu.edu> <1989Nov12.020742.8838@utzoo.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!think!husc6!spdcc!xylogics!world!bzs
From: bzs@world.std.com (Barry Shein)
Newsgroups: comp.arch
Subject: Re: 80-20
Message-ID: <1989Nov12.183132.3120@world.std.com>
Date: 12 Nov 89 18:31:32 GMT
References: <6927@pt.cs.cmu.edu> <1989Nov12.020742.8838@utzoo.uucp>
Organization: The World @ Software Tool & Die
Lines: 40
In-reply-to: henry@utzoo.uucp's message of 12 Nov 89 02:07:42 GMT