Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!mash From: mash@mips.com (John Mashey) Newsgroups: comp.arch Subject: Re: Optimising C compiler question Message-ID: <2418@spim.mips.COM> Date: 18 Apr 91 04:11:05 GMT References: <1991Apr8.193155.3911@vax5.cit.cornell.edu> Sender: news@mips.COM Distribution: comp Organization: MIPS Computer Systems, Inc. Lines: 15 Nntp-Posting-Host: winchester.mips.com In article <1991Apr8.193155.3911@vax5.cit.cornell.edu> umh@vax5.cit.cornell.edu writes: >Something I wonder about. >C has provision for register variables, which are supposed to run faster than >standard variables. How come one never sees register variables in any code? >Are modern RISC compilers sufficiently good that they automatically make >sensible choice of register variables? Yes. There are plenty of compilers around, at least {HP PA, MIPS, SPARC, IBM, but I'm sure others} which pretty much ignore whether or not you declare something register or not, and move variables in and out of registers (not necesarily the same ones) as makes sense. -- -john mashey DISCLAIMER: UUCP: mash@mips.com OR {ames,decwrl,prls,pyramid}!mips!mash DDD: 408-524-7015, 524-8253 or (main number) 408-720-1700 USPS: MIPS Computer Systems MS 1/05, 930 E. Arques, Sunnyvale, CA 94086