[comp.arch] SPARC vs. MIPS

aoki@faerie.Berkeley.EDU (Paul M. Aoki) (10/07/88)

In message <287@granite.dec.com>, John Danskin writes:
> By the way:
> 	There is a paper:
> 		"Register Windows Vs. General Registers: A Comparison of
> 		Memory Access Patterns" by Scott Morrison and Nancy Walker
> 		of UC Berkeley.
> 
> 	Which shows that the MIPS R2000 (aside from running faster) achieves
> 	fewer memory references (in almost all cases) than SPARC with all
> 	levels of optimization and as many as 7 register windows.
> 
> 	a) Does anyone know if/where (Earl?) this paper was published?
> 	(I got a copy from MIPS people, they love to give it away).
> 
> 	b) Does anybody at SUN have an answer (tell us how they got it all
> 	wrong, register windows really DO save memory references).

[ I don't know if it got published.  At the very least, it can be obtained
  from the UCB Engineering library, since it was a class project in Dave 
  Patterson's grad architecture course (ah, the irony).
  And BTW, that's Nancy *Waller*. ]

The MIPS vs. Sun4 comparisons (note that this != "MIPS vs. SPARC") that I've
seen always give the caveat that Sun's compiler doesn't do as good a job at 
optimizing as MIPS'.  Sun's cc generates code fragments that have (non-spill)
loads/stores that can be (and are, by MIPS' cc) eliminated.  This can be
dominated by other effects (I timed a 4/260 as doing 8x worse than a M/120 
on ackermann(3,10) -- I wonder why?), but in general eliminating "compiler 
smarts" as a variable in the two architectures' memory accesses seems to be 
a problem.  If the effect is big enough, register windows may turn out to be 
less evil than you think.  Does anyone know?

As to the assertion that the R2000 "runs faster":

MY class project in Dave Patterson's grad architecture course is to try to 
get a better handle on why that, uh, appears to be true.  The current plan 
to look at the load/store figures a bit more closely, esp. the register 
window overhead.  I also plan to run some MIPS code on the Sun4 (which gets 
rid of the compiler AND register window variables) in some test cases.

Some questions, aimed mostly at MIPS and Sun people:

1. It would also be nice to know what tools people have out there.
* Does anyone have a MIPS --> Sun assembly language translator?
* Can anyone at MIPS provide source for Pixie so we can hack on it here?
  Looks like someone even took away Morrison and Waller's pixiecan-reading
  program -- we don't have it here anymore.  (I can get at UMIPS I mean 
  "RISC/os" source -- except for the compiler and profilers.  Help!)
* Any other fun toys?

2. If anyone has any suggestions for other things that should be looked at
Real Closely, I'd like to hear them.  I hear "register windows register
windows register windows" -- what about HW vs SW interlocking, or any of
the other differences between the processors?

3. If anyone has been saving up the various comp.arch "RISC wars" discussions,
I'd like a copy.
----------------
Paul M. Aoki
CS Division, Dept. of EECS // UCB // Berkeley, CA 94720		(415) 642-1863
aoki@postgres.Berkeley.EDU					...!ucbvax!aoki