Date: Mon, 15 Mar 1999 23:58:07 -0800 From: "David O'Brien" <obrien@NUXI.com> To: Andrew Reilly <andrew@lake.com.au> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Use of "register" in code Message-ID: <19990315235807.A73567@relay.nuxi.com> In-Reply-To: <19990316054325.40786.qmail@areilly.bpc-users.org>; from Andrew Reilly on Tue, Mar 16, 1999 at 04:43:25PM %2B1100 References: <199903160527.VAA06458@apollo.backplane.com> <19990316054325.40786.qmail@areilly.bpc-users.org>
index | next in thread | previous in thread | raw e-mail
On Tue, Mar 16, 1999 at 04:43:25PM +1100, Andrew Reilly wrote: > But how is using 'register' with gcc in FreeBSD going to make > performance _worse_, given that gcc is quite happy to move register > variables to and from the stack? Possibly you should take this up on comp.compilers (or comp.std.c). This discussion is much more applicable there than freebsd-hackers. Please study the aggressive optimizations that a modern compiler does and you will realize that the resulting code looks *nothing* like what you would imagine if you "hand compiled" it. Back in the days of the Small C compiler (with only a peephole optimizer), "register" was useful to do some manual optimizations. But no longer. There is a nice ACM Survey paper on compiler optimizations you should read. I can provide the referenced tomorrow when I get to my lab. There is also a new text book on compiler optimizations that came out last year (and used in a grad class here) that would also answer your questions on why "register" is useless today. I can also provide a reference to that tomorrow. -- -- David (obrien@NUXI.com -or- obrien@FreeBSD.org) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the messagehelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990315235807.A73567>
